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:
Diffstat (limited to 'lib/api/helpers/packages/basic_auth_helpers.rb')
-rw-r--r--lib/api/helpers/packages/basic_auth_helpers.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/api/helpers/packages/basic_auth_helpers.rb b/lib/api/helpers/packages/basic_auth_helpers.rb
index c32ce199dd6..6c381d85cd8 100644
--- a/lib/api/helpers/packages/basic_auth_helpers.rb
+++ b/lib/api/helpers/packages/basic_auth_helpers.rb
@@ -22,6 +22,14 @@ module API
unauthorized_user_project || not_found!
end
+ def unauthorized_user_group
+ @unauthorized_user_group ||= find_group(params[:id])
+ end
+
+ def unauthorized_user_group!
+ unauthorized_user_group || not_found!
+ end
+
def authorized_user_project
@authorized_user_project ||= authorized_project_find!
end