Name |
Last commit
|
Last Update |
---|---|---|
.. | ||
api | ||
bus | ||
cmd | ||
components | ||
events | ||
extensions | ||
infra | ||
login | ||
middleware | ||
models | ||
plugins | ||
registry | ||
services | ||
setting | ||
tsdb | ||
util | ||
ARCHITECTURE.md | ||
README.md | ||
STYLEGUIDE.md |
* Auth: Do not search for the user twice Previously `initContextWithBasicAuth` did not use `LoginUserQuery`, doing `GetUserByLoginQuery` only i.e. looking user in DB only, things changed when this function started to check LDAP provider via `LoginUserQuery` (#6940), however, this request was placed after `GetUserByLoginQuery`, so we first looking in DB then in the LDAP - if LDAP user hasn't logged in we will not find it in DB, so `LoginUserQuery` will never be reached. `LoginUserQuery` request already performs `GetUserByLoginQuery` request in correct sequence. So we can just remove redundant request. * Correct sequence execution during authentification & introduce tests for it * Move basic auth tests to separate test file, since main test file already pretty large * Introduce `testing.go` for the middleware module * Remove redundant test helper function * Make handler names more explicit Ref 5777f65d Fixes #18329 * Auth: address review comment
Name |
Last commit
|
Last Update |
---|---|---|
.. | ||
api | Loading commit data... | |
bus | Loading commit data... | |
cmd | Loading commit data... | |
components | Loading commit data... | |
events | Loading commit data... | |
extensions | Loading commit data... | |
infra | Loading commit data... | |
login | Loading commit data... | |
middleware | Loading commit data... | |
models | Loading commit data... | |
plugins | Loading commit data... | |
registry | Loading commit data... | |
services | Loading commit data... | |
setting | Loading commit data... | |
tsdb | Loading commit data... | |
util | Loading commit data... | |
ARCHITECTURE.md | Loading commit data... | |
README.md | Loading commit data... | |
STYLEGUIDE.md | Loading commit data... |