summaryrefslogtreecommitdiff
path: root/lib/api/helpers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-01 07:28:22 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-01 07:28:28 +0000
commit37f194bbc19045abe013a58274494c1a6c8bbdd5 (patch)
tree99ae3d2a13d8d5592c8fabc7ed38d5117dbfe163 /lib/api/helpers
parentde222caa576cab3d0894c65531f5822f205877d5 (diff)
downloadgitlab-ce-37f194bbc19045abe013a58274494c1a6c8bbdd5.tar.gz
Add latest changes from gitlab-org/security/gitlab@15-0-stable-ee
Diffstat (limited to 'lib/api/helpers')
-rw-r--r--lib/api/helpers/members_helpers.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/helpers/members_helpers.rb b/lib/api/helpers/members_helpers.rb
index c91e153c7b9..6a3cf5c87ae 100644
--- a/lib/api/helpers/members_helpers.rb
+++ b/lib/api/helpers/members_helpers.rb
@@ -15,6 +15,10 @@ module API
public_send("find_#{source_type}!", id) # rubocop:disable GitlabSecurity/PublicSend
end
+ def authorize_read_source_member!(source_type, source)
+ authorize! :"read_#{source_type}_member", source
+ end
+
def authorize_admin_source!(source_type, source)
authorize! :"admin_#{source_type}", source
end