summaryrefslogtreecommitdiff
path: root/app/models/project_team.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-03-14 18:07:46 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-14 18:07:46 +0000
commitfbf2955cfc9ffc319d57960a0b0df1ee1b5fd05f (patch)
tree6964ec0aaac3d432a4795878e87d78566f7bf719 /app/models/project_team.rb
parent739467f1fa4d5d4042b47ff6637a567d1ad6a4a4 (diff)
downloadgitlab-ce-fbf2955cfc9ffc319d57960a0b0df1ee1b5fd05f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project_team.rb')
-rw-r--r--app/models/project_team.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/project_team.rb b/app/models/project_team.rb
index ee5ecc2dd3c..d5e0d112aeb 100644
--- a/app/models/project_team.rb
+++ b/app/models/project_team.rb
@@ -179,7 +179,9 @@ class ProjectTeam
#
# Returns a Hash mapping user ID -> maximum access level.
def max_member_access_for_user_ids(user_ids)
- project.max_member_access_for_resource_ids(User, user_ids) do |user_ids|
+ Gitlab::SafeRequestLoader.execute(resource_key: project.max_member_access_for_resource_key(User),
+ resource_ids: user_ids,
+ default_value: Gitlab::Access::NO_ACCESS) do |user_ids|
project.project_authorizations
.where(user: user_ids)
.group(:user_id)