diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-03 15:13:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-03 15:13:29 +0300 |
commit | d9ec4caf8fe4a4315e8e09e48d3ec79fd0a724c5 (patch) | |
tree | 9bff42fdcadcee465c800a3458322fa0fa815135 /app/controllers | |
parent | 49bd8609775923402610f4c7f7c1f8aa1efdfe7e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
4 files changed, 15 insertions, 2 deletions
diff --git a/app/controllers/concerns/access_tokens_actions.rb b/app/controllers/concerns/access_tokens_actions.rb index de53fd4d835..84cbdda1581 100644 --- a/app/controllers/concerns/access_tokens_actions.rb +++ b/app/controllers/concerns/access_tokens_actions.rb @@ -69,7 +69,6 @@ module AccessTokensActions resource.members.load @scopes = Gitlab::Auth.available_scopes_for(resource) - @scopes.delete(Gitlab::Auth::K8S_PROXY_SCOPE) unless Feature.enabled?(:k8s_proxy_pat, current_user) @active_access_tokens = active_access_tokens end # rubocop:enable Gitlab/ModuleWithInstanceVariables diff --git a/app/controllers/organizations/application_controller.rb b/app/controllers/organizations/application_controller.rb index d3c3e878bdf..8a99b6804ae 100644 --- a/app/controllers/organizations/application_controller.rb +++ b/app/controllers/organizations/application_controller.rb @@ -27,5 +27,9 @@ module Organizations def authorize_read_organization! access_denied! unless can?(current_user, :read_organization, organization) end + + def authorize_admin_organization! + access_denied! unless can?(current_user, :admin_organization, organization) + end end end diff --git a/app/controllers/organizations/settings_controller.rb b/app/controllers/organizations/settings_controller.rb new file mode 100644 index 00000000000..a81cbf57a42 --- /dev/null +++ b/app/controllers/organizations/settings_controller.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Organizations + class SettingsController < ApplicationController + feature_category :cell + + before_action :authorize_admin_organization! + + def general; end + end +end diff --git a/app/controllers/profiles/personal_access_tokens_controller.rb b/app/controllers/profiles/personal_access_tokens_controller.rb index 0e4d9f3c154..4b6e2f768fa 100644 --- a/app/controllers/profiles/personal_access_tokens_controller.rb +++ b/app/controllers/profiles/personal_access_tokens_controller.rb @@ -61,7 +61,6 @@ class Profiles::PersonalAccessTokensController < Profiles::ApplicationController def set_index_vars @scopes = Gitlab::Auth.available_scopes_for(current_user) - @scopes.delete(Gitlab::Auth::K8S_PROXY_SCOPE) unless Feature.enabled?(:k8s_proxy_pat, current_user) @active_access_tokens = active_access_tokens end |