1. 09 Aug, 2019 1 commit
  2. 08 Aug, 2019 6 commits
  3. 07 Aug, 2019 11 commits
  4. 06 Aug, 2019 15 commits
  5. 05 Aug, 2019 6 commits
  6. 03 Aug, 2019 1 commit
    • Auth: Do not search for the user twice (#18366) · d88fdc86
      * 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
      Oleg Gaidarenko committed