diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-05 12:22:34 -0500 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-06 21:20:16 -0500 |
commit | 8315861c9a50675b4f4f4ca536f0da90f27994f3 (patch) | |
tree | b5f25e5dbd74621ef77d480ba69f4f21d5c00d7d /app/controllers | |
parent | 72220a99d1cdbcf8a914f9e765c43e63eaee2548 (diff) | |
download | gitlab-ce-8315861c9a50675b4f4f4ca536f0da90f27994f3.tar.gz |
Include ProjectDeployTokens
Also:
- Changes scopes from serializer to use boolean columns
- Fixes broken specs
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/deploy_tokens_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/settings/repository_controller.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/deploy_tokens_controller.rb b/app/controllers/projects/deploy_tokens_controller.rb index a7d9590ba19..e3a2e5697b5 100644 --- a/app/controllers/projects/deploy_tokens_controller.rb +++ b/app/controllers/projects/deploy_tokens_controller.rb @@ -21,6 +21,6 @@ class Projects::DeployTokensController < Projects::ApplicationController private def deploy_token_params - params.require(:deploy_token).permit(:name, :expires_at, scopes: []) + params.require(:deploy_token).permit(:name, :expires_at, :read_repository, :read_registry) end end diff --git a/app/controllers/projects/settings/repository_controller.rb b/app/controllers/projects/settings/repository_controller.rb index ab6d8b3b10c..b6b8963948c 100644 --- a/app/controllers/projects/settings/repository_controller.rb +++ b/app/controllers/projects/settings/repository_controller.rb @@ -56,7 +56,7 @@ module Projects def define_deploy_token attributes = @deploy_tokens.attributes_deploy_token - @deploy_token = @project.deploy_tokens.build(attributes) + @deploy_token = DeployToken.new(attributes) @deploy_token.valid? unless attributes.empty? end end |