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.rb')
-rw-r--r--lib/api/helpers.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index bb94d5d14d0..f5dcbc07704 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -146,7 +146,7 @@ module API
if id.is_a?(Integer) || id =~ INTEGER_ID_REGEX
projects.find_by(id: id)
elsif id.include?("/")
- projects.find_by_full_path(id, follow_redirects: Feature.enabled?(:api_redirect_moved_projects))
+ projects.find_by_full_path(id, follow_redirects: true)
end
end
# rubocop: enable CodeReuse/ActiveRecord
@@ -378,6 +378,10 @@ module API
authorize! :admin_group, user_group
end
+ def authorize_admin_member_role!
+ authorize! :admin_member_role, user_group
+ end
+
def authorize_read_builds!
authorize! :read_build, user_project
end
@@ -905,7 +909,6 @@ module API
end
def project_moved?(id, project)
- return false unless Feature.enabled?(:api_redirect_moved_projects)
return false unless id.is_a?(String) && id.include?('/')
return false if project.blank? || project.full_path.casecmp?(id)
return false unless params[:id] == id