2018-03-19 12:11:12 -04:00
|
|
|
%p.profile-settings-content
|
2021-02-03 04:09:07 -05:00
|
|
|
= s_("DeployTokens|Pick a name for your unique deploy token.")
|
2018-03-19 12:11:12 -04:00
|
|
|
|
2020-04-01 08:08:00 -04:00
|
|
|
= form_for token, url: create_deploy_token_path(group_or_project, anchor: 'js-deploy-tokens'), method: :post, remote: Feature.enabled?(:ajax_new_deploy_token, group_or_project) do |f|
|
2018-03-19 12:11:12 -04:00
|
|
|
= form_errors(token)
|
|
|
|
|
|
|
|
.form-group
|
2018-07-19 18:11:31 -04:00
|
|
|
= f.label :name, class: 'label-bold'
|
2021-02-02 10:09:06 -05:00
|
|
|
= f.text_field :name, class: 'form-control gl-form-input qa-deploy-token-name', required: true
|
2018-03-19 12:11:12 -04:00
|
|
|
|
|
|
|
.form-group
|
2021-02-03 04:09:07 -05:00
|
|
|
= f.label :expires_at, _('Expires at (optional)'), class: 'label-bold'
|
|
|
|
= f.text_field :expires_at, class: 'datepicker form-control qa-deploy-token-expires-at', value: f.object.expires_at
|
|
|
|
.text-secondary= s_('DeployTokens|Unless you enter a date, the token does not expire.')
|
2018-03-19 12:11:12 -04:00
|
|
|
|
2019-07-02 14:56:48 -04:00
|
|
|
.form-group
|
2021-02-03 04:09:07 -05:00
|
|
|
= f.label :username, _('Username (optional)'), class: 'label-bold'
|
|
|
|
= f.text_field :username, class: 'form-control qa-deploy-token-username'
|
|
|
|
.text-secondary= s_('DeployTokens|Unless you specify a username, it is set to "gitlab+deploy-token-{n}".')
|
2019-07-02 14:56:48 -04:00
|
|
|
|
2018-03-19 12:11:12 -04:00
|
|
|
.form-group
|
2021-02-03 04:09:07 -05:00
|
|
|
= f.label :scopes, _('Scopes [Select 1 or more]'), class: 'label-bold'
|
2018-07-18 09:05:30 -04:00
|
|
|
%fieldset.form-group.form-check
|
2018-10-08 18:31:57 -04:00
|
|
|
= f.check_box :read_repository, class: 'form-check-input qa-deploy-token-read-repository'
|
2018-07-19 18:11:31 -04:00
|
|
|
= label_tag ("deploy_token_read_repository"), 'read_repository', class: 'label-bold form-check-label'
|
2021-02-03 04:09:07 -05:00
|
|
|
.text-secondary= s_('DeployTokens|Allows read-only access to the repository.')
|
2018-04-06 10:30:21 -04:00
|
|
|
|
2020-02-28 13:09:07 -05:00
|
|
|
- if container_registry_enabled?(group_or_project)
|
2018-07-18 09:05:30 -04:00
|
|
|
%fieldset.form-group.form-check
|
2018-10-08 18:31:57 -04:00
|
|
|
= f.check_box :read_registry, class: 'form-check-input qa-deploy-token-read-registry'
|
2018-07-19 18:11:31 -04:00
|
|
|
= label_tag ("deploy_token_read_registry"), 'read_registry', class: 'label-bold form-check-label'
|
2021-02-03 04:09:07 -05:00
|
|
|
.text-secondary= s_('DeployTokens|Allows read-only access to registry images.')
|
2018-03-19 12:11:12 -04:00
|
|
|
|
2020-04-13 20:09:57 -04:00
|
|
|
%fieldset.form-group.form-check
|
|
|
|
= f.check_box :write_registry, class: 'form-check-input'
|
|
|
|
= label_tag ("deploy_token_write_registry"), 'write_registry', class: 'label-bold form-check-label'
|
2021-02-03 04:09:07 -05:00
|
|
|
.text-secondary= s_('DeployTokens|Allows write access to registry images.')
|
2020-04-13 20:09:57 -04:00
|
|
|
|
2020-09-08 11:08:41 -04:00
|
|
|
- if packages_registry_enabled?(group_or_project)
|
2020-05-13 23:07:52 -04:00
|
|
|
%fieldset.form-group.form-check
|
|
|
|
= f.check_box :read_package_registry, class: 'form-check-input'
|
|
|
|
= label_tag ("deploy_token_read_package_registry"), 'read_package_registry', class: 'label-bold form-check-label'
|
2021-02-03 04:09:07 -05:00
|
|
|
.text-secondary= s_('DeployTokens|Allows read access to the package registry.')
|
2020-05-13 23:07:52 -04:00
|
|
|
|
|
|
|
%fieldset.form-group.form-check
|
|
|
|
= f.check_box :write_package_registry, class: 'form-check-input'
|
|
|
|
= label_tag ("deploy_token_write_package_registry"), 'write_package_registry', class: 'label-bold form-check-label'
|
2021-02-03 04:09:07 -05:00
|
|
|
.text-secondary= s_('DeployTokens|Allows write access to the package registry.')
|
2020-05-13 23:07:52 -04:00
|
|
|
|
2020-09-23 17:09:28 -04:00
|
|
|
.gl-mt-3
|
2021-01-22 16:09:10 -05:00
|
|
|
= f.submit s_('DeployTokens|Create deploy token'), class: 'btn gl-button btn-success qa-create-deploy-token'
|