summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2018-04-05 12:22:34 -0500
committerMayra Cabrera <mcabrera@gitlab.com>2018-04-06 21:20:16 -0500
commit8315861c9a50675b4f4f4ca536f0da90f27994f3 (patch)
treeb5f25e5dbd74621ef77d480ba69f4f21d5c00d7d /app/views
parent72220a99d1cdbcf8a914f9e765c43e63eaee2548 (diff)
downloadgitlab-ce-8315861c9a50675b4f4f4ca536f0da90f27994f3.tar.gz
Include ProjectDeployTokens
Also: - Changes scopes from serializer to use boolean columns - Fixes broken specs
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/deploy_tokens/_form.html.haml11
-rw-r--r--app/views/projects/deploy_tokens/_scope_form.html.haml4
2 files changed, 9 insertions, 6 deletions
diff --git a/app/views/projects/deploy_tokens/_form.html.haml b/app/views/projects/deploy_tokens/_form.html.haml
index 001afcf1944..3e83a2aae46 100644
--- a/app/views/projects/deploy_tokens/_form.html.haml
+++ b/app/views/projects/deploy_tokens/_form.html.haml
@@ -14,8 +14,15 @@
.form-group
= f.label :scopes, class: 'label-light'
- - presenter.available_scopes.each do |scope|
- = render 'projects/deploy_tokens/scope_form', token: token, scope: scope, presenter: presenter
+ %fieldset
+ = f.check_box :read_repository
+ = label_tag ("deploy_token_read_repository"), 'read_repository'
+ %span= s_('DeployTokens|Allows read-only access to the repository')
+
+ %fieldset
+ = f.check_box :read_registry
+ = label_tag ("deploy_token_read_registry"), 'read_registry'
+ %span= s_('DeployTokens|Allows read-only access to the registry images')
.prepend-top-default
= f.submit s_('DeployTokens|Create deploy token'), class: 'btn btn-success'
diff --git a/app/views/projects/deploy_tokens/_scope_form.html.haml b/app/views/projects/deploy_tokens/_scope_form.html.haml
deleted file mode 100644
index f67701c8ee1..00000000000
--- a/app/views/projects/deploy_tokens/_scope_form.html.haml
+++ /dev/null
@@ -1,4 +0,0 @@
-%fieldset
- = check_box_tag "deploy_token[scopes][]", scope, token.scopes.include?(scope), id: "deploy_token_scopes_#{scope}"
- = label_tag ("deploy_token_scopes_#{scope}"), scope
- %span= presenter.scope_description(scope)