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:
authorDouwe Maan <douwe@selenight.nl>2017-10-03 17:57:31 +0300
committerDouwe Maan <douwe@selenight.nl>2017-10-03 17:57:36 +0300
commit55fe0d7d0aeb9e10730610a646080f8717f37fd0 (patch)
tree140e9ccb61db907a81d61830d5b98f6e79c43c77 /app/controllers
parentb8e47d72637167be5a225fe20b5f893c43b9a885 (diff)
Set default scope on PATs that don't have one set to allow them to be revoked
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/profiles/personal_access_tokens_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/profiles/personal_access_tokens_controller.rb b/app/controllers/profiles/personal_access_tokens_controller.rb
index c1cc509a748..4146deefa89 100644
--- a/app/controllers/profiles/personal_access_tokens_controller.rb
+++ b/app/controllers/profiles/personal_access_tokens_controller.rb
@@ -1,6 +1,7 @@
class Profiles::PersonalAccessTokensController < Profiles::ApplicationController
def index
set_index_vars
+ @personal_access_token = finder.build
end
def create
@@ -40,7 +41,6 @@ class Profiles::PersonalAccessTokensController < Profiles::ApplicationController
def set_index_vars
@scopes = Gitlab::Auth.available_scopes
- @personal_access_token = finder.build
@inactive_personal_access_tokens = finder(state: 'inactive').execute
@active_personal_access_tokens = finder(state: 'active').execute.order(:expires_at)
end