Commit Graph

20 Commits

Author SHA1 Message Date
GitLab Bot 0ae8428c8e Add latest changes from gitlab-org/gitlab@master 2021-05-11 21:10:21 +00:00
GitLab Bot 958d8a85d3 Add latest changes from gitlab-org/gitlab@master 2021-02-24 15:11:10 +00:00
GitLab Bot f23a9a17ed Add latest changes from gitlab-org/gitlab@master 2021-01-18 12:10:41 +00:00
GitLab Bot 2368893df7 Add latest changes from gitlab-org/gitlab@master 2020-08-31 15:10:41 +00:00
GitLab Bot 7258040618 Add latest changes from gitlab-org/gitlab@master 2020-06-09 00:08:47 +00:00
GitLab Bot 221b529789 Add latest changes from gitlab-org/gitlab@master 2020-04-15 09:09:46 +00:00
GitLab Bot b7dfe2ae40 Add latest changes from gitlab-org/gitlab@master 2019-09-13 13:26:31 +00:00
William George 1b153d497b Make getting a user by the username case insensitive 2018-10-18 09:06:44 +00:00
Stan Hu 32b96bfd81 Merge branch 'frozen-string-app-finders-graphql' into 'master'
Enable frozen string in app/graphql + app/finders

See merge request gitlab-org/gitlab-ce!21681
2018-09-13 19:44:31 +00:00
gfyoung 47b3038434 Enable frozen string in app/graphql + app/finders
Partially addresses #47424.
2018-09-11 12:15:23 -07:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Dmitriy Zaporozhets c87c55bb35 Add 2FA filter to users API for admins only
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2018-04-23 11:54:45 +03:00
Francisco Javier López 7c2b7296d4 Added default order to UserFinder 2017-12-04 09:49:53 +00:00
Markus Koller e9eae3eb0d Support custom attributes on users 2017-09-28 16:49:42 +00:00
James Lopez cda7cbde03 refactor created at filter to use model scopes 2017-07-07 18:31:50 +02:00
James Lopez 377244dd45 refactor filters 2017-07-07 11:38:01 +02:00
James Lopez 1a7d2aba3b add created at filter logic to users finder and API 2017-07-07 10:38:57 +02:00
Timothy Andrew 3c88a7869b Implement review comments for !12445 from @godfat and @rymai.
- 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.
2017-06-30 13:06:03 +00:00
Timothy Andrew 20f679d620 Allow unauthenticated access to the `/api/v4/users` API.
- 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)`
2017-06-26 07:20:30 +00:00
George Andrinopoulos 872e7b7efe Create a Users Finder 2017-05-15 13:53:12 +00:00