diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /app/controllers/profiles | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) | |
download | gitlab-ce-e8d2c2579383897a1dd7f9debd359abe8ae8373d.tar.gz |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r-- | app/controllers/profiles/gpg_keys_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/profiles/personal_access_tokens_controller.rb | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/profiles/gpg_keys_controller.rb b/app/controllers/profiles/gpg_keys_controller.rb index 7f04927f517..9e16d195b00 100644 --- a/app/controllers/profiles/gpg_keys_controller.rb +++ b/app/controllers/profiles/gpg_keys_controller.rb @@ -22,7 +22,7 @@ class Profiles::GpgKeysController < Profiles::ApplicationController end def destroy - @gpg_key.destroy + GpgKeys::DestroyService.new(current_user).execute(@gpg_key) respond_to do |format| format.html { redirect_to profile_gpg_keys_url, status: :found } diff --git a/app/controllers/profiles/personal_access_tokens_controller.rb b/app/controllers/profiles/personal_access_tokens_controller.rb index ba539ef808d..8dc9697c56d 100644 --- a/app/controllers/profiles/personal_access_tokens_controller.rb +++ b/app/controllers/profiles/personal_access_tokens_controller.rb @@ -9,7 +9,11 @@ class Profiles::PersonalAccessTokensController < Profiles::ApplicationController def index set_index_vars - @personal_access_token = finder.build + scopes = params[:scopes].split(',').map(&:squish).select(&:present?).map(&:to_sym) unless params[:scopes].nil? + @personal_access_token = finder.build( + name: params[:name], + scopes: scopes + ) end def create |