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.rb18
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/api/helpers/packages/basic_auth_helpers.rb b/lib/api/helpers/packages/basic_auth_helpers.rb
index 6c381d85cd8..ebedb3b7563 100644
--- a/lib/api/helpers/packages/basic_auth_helpers.rb
+++ b/lib/api/helpers/packages/basic_auth_helpers.rb
@@ -14,28 +14,12 @@ module API
include Constants
include Gitlab::Utils::StrongMemoize
- def unauthorized_user_project
- @unauthorized_user_project ||= find_project(params[:id])
- end
-
- def unauthorized_user_project!
- 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
def authorized_project_find!
- project = unauthorized_user_project
+ project = find_project(params[:id])
unless project && can?(current_user, :read_project, project)
return unauthorized_or! { not_found! }