summaryrefslogtreecommitdiff
path: root/lib/api/helpers
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-11-24 16:58:32 +0100
committerRémy Coutable <remy@rymai.me>2016-11-24 16:58:32 +0100
commit81ba3f9177fcfd76f6b3b715c572ce4920398345 (patch)
treebfcefba5a558d69051bf67f2cef2a259c0928942 /lib/api/helpers
parent4f5ed812325845f263fc9b566651c1179b5c24bc (diff)
downloadgitlab-ce-81ba3f9177fcfd76f6b3b715c572ce4920398345.tar.gz
API: Introduce `#find_group!` which also check access permission22373-reduce-queries-in-api-helpers-find_project
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api/helpers')
-rw-r--r--lib/api/helpers/members_helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/helpers/members_helpers.rb b/lib/api/helpers/members_helpers.rb
index 90114f6f667..d9cae1501f8 100644
--- a/lib/api/helpers/members_helpers.rb
+++ b/lib/api/helpers/members_helpers.rb
@@ -2,7 +2,7 @@ module API
module Helpers
module MembersHelpers
def find_source(source_type, id)
- public_send("find_#{source_type}", id)
+ public_send("find_#{source_type}!", id)
end
def authorize_admin_source!(source_type, source)