summaryrefslogtreecommitdiff
path: root/app/finders/users_finder.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-131-0/+2
|
* Make getting a user by the username case insensitiveWilliam George2018-10-181-3/+1
|
* Merge branch 'frozen-string-app-finders-graphql' into 'master'Stan Hu2018-09-131-0/+2
|\ | | | | | | | | Enable frozen string in app/graphql + app/finders See merge request gitlab-org/gitlab-ce!21681
| * Enable frozen string in app/graphql + app/findersgfyoung2018-09-111-0/+2
| | | | | | | | Partially addresses #47424.
* | Disable existing offenses for the CodeReuse copsYorick Peterse2018-09-111-0/+6
|/ | | | | This whitelists all existing offenses for the various CodeReuse cops, of which most are triggered by the CodeReuse/ActiveRecord cop.
* Add 2FA filter to users API for admins onlyDmitriy Zaporozhets2018-04-231-0/+12
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Added default order to UserFinderFrancisco Javier López2017-12-041-1/+1
|
* Support custom attributes on usersMarkus Koller2017-09-281-0/+2
|
* refactor created at filter to use model scopesJames Lopez2017-07-071-1/+1
|
* refactor filtersJames Lopez2017-07-071-12/+2
|
* add created at filter logic to users finder and APIJames Lopez2017-07-071-0/+13
|
* Implement review comments for !12445 from @godfat and @rymai.Timothy Andrew2017-06-301-7/+4
| | | | | | | | | | | | | | | - Use `GlobalPolicy` to authorize the users that a non-authenticated user can fetch from `/api/v4/users`. We allow access if the `Gitlab::VisibilityLevel::PUBLIC` visibility level is not restricted. - Further, as before, `/api/v4/users` is only accessible to unauthenticated users if the `username` parameter is passed. - Turn off `authenticate!` for the `/api/v4/users` endpoint by matching on the actual route + method, rather than the description. - Change the type of `current_user` check in `UsersFinder` to be more compatible with EE.
* Allow unauthenticated access to the `/api/v4/users` API.Timothy Andrew2017-06-261-2/+5
| | | | | | | | | | | | | | | | - The issue filtering frontend code needs access to this API for non-logged-in users + public projects. It uses the API to fetch information for a user by username. - We don't authenticate this API anymore, but instead - if the `current_user` is not present: - Verify that the `username` parameter has been passed. This disallows an unauthenticated user from grabbing a list of all users on the instance. The `UsersFinder` class performs an exact match on the `username`, so we are guaranteed to get 0 or 1 users. - Verify that the resulting user (if any) is accessible to be viewed publicly by calling `can?(current_user, :read_user, user)`
* Create a Users FinderGeorge Andrinopoulos2017-05-151-0/+74