Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-06-23 18:14:31 +0300
committerRémy Coutable <remy@rymai.me>2016-08-10 20:07:05 +0300
commit29850364eccccc3ce7305f6706cea1d5d073de2e (patch)
treebbf98c0a621676b7b3f3e58b4618905923ed1454 /lib/api/helpers
parentb1aac0382c406b3856db90e15df8b2a9ea7ff6cd (diff)
New AccessRequests API endpoints for Group & Project
Also, mutualize AccessRequests and Members endpoints for Group & Project. New API documentation for the AccessRequests endpoints. Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/api/helpers')
-rw-r--r--lib/api/helpers/members_helpers.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/api/helpers/members_helpers.rb b/lib/api/helpers/members_helpers.rb
new file mode 100644
index 00000000000..90114f6f667
--- /dev/null
+++ b/lib/api/helpers/members_helpers.rb
@@ -0,0 +1,13 @@
+module API
+ module Helpers
+ module MembersHelpers
+ def find_source(source_type, id)
+ public_send("find_#{source_type}", id)
+ end
+
+ def authorize_admin_source!(source_type, source)
+ authorize! :"admin_#{source_type}", source
+ end
+ end
+ end
+end