debian-mirror-gitlab/app/views/profiles/personal_access_tokens/index.html.haml

94 lines
5.3 KiB
Text
Raw Normal View History

2019-09-30 21:07:59 +05:30
- breadcrumb_title s_('AccessTokens|Access Tokens')
- page_title s_('AccessTokens|Personal Access Tokens')
2020-05-24 23:13:21 +05:30
- type = _('personal access token')
- type_plural = _('personal access tokens')
- @content_class = 'limit-container-width' unless fluid_layout
2017-09-10 17:25:29 +05:30
2021-03-11 19:13:27 +05:30
.row.gl-mt-3.js-search-settings-section
2017-09-10 17:25:29 +05:30
.col-lg-4.profile-settings-sidebar
2020-06-23 00:09:42 +05:30
%h4.gl-mt-0
2016-06-22 15:30:34 +05:30
= page_title
%p
2019-09-30 21:07:59 +05:30
= s_('AccessTokens|You can generate a personal access token for each application you use that needs access to the GitLab API.')
2016-09-13 17:45:13 +05:30
%p
2019-09-30 21:07:59 +05:30
= s_('AccessTokens|You can also use personal access tokens to authenticate against Git over HTTP.')
= s_('AccessTokens|They are the only accepted password when you have Two-Factor Authentication (2FA) enabled.')
2016-09-13 17:45:13 +05:30
2017-09-10 17:25:29 +05:30
.col-lg-8
2018-03-17 18:26:18 +05:30
- if @new_personal_access_token
2020-05-24 23:13:21 +05:30
= render 'shared/access_tokens/created_container',
type: type,
new_token_value: @new_personal_access_token
2016-06-22 15:30:34 +05:30
2020-05-24 23:13:21 +05:30
= render 'shared/access_tokens/form',
type: type,
path: profile_personal_access_tokens_path,
token: @personal_access_token,
2021-09-30 23:02:18 +05:30
scopes: @scopes,
help_path: help_page_path('user/profile/personal_access_tokens.md', anchor: 'personal-access-token-scopes')
2016-06-22 15:30:34 +05:30
2020-05-24 23:13:21 +05:30
= render 'shared/access_tokens/table',
type: type,
type_plural: type_plural,
active_tokens: @active_personal_access_tokens,
revoke_route_helper: ->(token) { revoke_profile_personal_access_token_path(token) }
2018-03-17 18:26:18 +05:30
2021-02-22 17:27:13 +05:30
- unless Gitlab::CurrentSettings.disable_feed_token
2021-03-11 19:13:27 +05:30
.col-lg-12
%hr
.row.gl-mt-3.js-search-settings-section
2021-02-22 17:27:13 +05:30
.col-lg-4.profile-settings-sidebar
%h4.gl-mt-0
= s_('AccessTokens|Feed token')
%p
2021-09-04 01:27:46 +05:30
= s_('AccessTokens|Your feed token authenticates you when your RSS reader loads a personalized RSS feed or when your calendar application loads a personalized calendar. It is visible in those feed URLs.')
2021-02-22 17:27:13 +05:30
%p
= s_('AccessTokens|It cannot be used to access any other data.')
.col-lg-8.feed-token-reset
= label_tag :feed_token, s_('AccessTokens|Feed token'), class: 'label-bold'
2021-03-11 19:13:27 +05:30
= text_field_tag :feed_token, current_user.feed_token, class: 'form-control gl-form-input js-select-on-focus', readonly: true
2021-02-22 17:27:13 +05:30
%p.form-text.text-muted
2021-09-04 01:27:46 +05:30
- reset_link = link_to s_('AccessTokens|reset this token'), [:reset, :feed_token, :profile], method: :put, data: { confirm: s_('AccessTokens|Are you sure? Any RSS or calendar URLs currently in use will stop working.'), testid: :reset_feed_token_link }
- reset_message = s_('AccessTokens|Keep this token secret. Anyone who has it can read activity and issue RSS feeds or your calendar feed as if they were you. If that happens, %{link_reset_it}.') % { link_reset_it: reset_link }
2021-02-22 17:27:13 +05:30
= reset_message.html_safe
2018-03-17 18:26:18 +05:30
- if incoming_email_token_enabled?
2021-03-11 19:13:27 +05:30
.col-lg-12
%hr
.row.gl-mt-3.js-search-settings-section
2018-03-17 18:26:18 +05:30
.col-lg-4.profile-settings-sidebar
2020-06-23 00:09:42 +05:30
%h4.gl-mt-0
2019-09-30 21:07:59 +05:30
= s_('AccessTokens|Incoming email token')
2018-03-17 18:26:18 +05:30
%p
2021-09-04 01:27:46 +05:30
= s_('AccessTokens|Your incoming email token authenticates you when you create a new issue by email, and is included in your personal project-specific email addresses.')
2018-03-17 18:26:18 +05:30
%p
2019-09-30 21:07:59 +05:30
= s_('AccessTokens|It cannot be used to access any other data.')
2018-03-17 18:26:18 +05:30
.col-lg-8.incoming-email-token-reset
2020-05-24 23:13:21 +05:30
= label_tag :incoming_email_token, s_('AccessTokens|Incoming email token'), class: 'label-bold'
2021-03-11 19:13:27 +05:30
= text_field_tag :incoming_email_token, current_user.incoming_email_token, class: 'form-control gl-form-input js-select-on-focus', readonly: true
2018-11-08 19:23:39 +05:30
%p.form-text.text-muted
2021-09-04 01:27:46 +05:30
- reset_link = link_to s_('AccessTokens|reset this token'), [:reset, :incoming_email_token, :profile], method: :put, data: { confirm: s_('AccessTokens|Are you sure? Any issue email addresses currently in use will stop working.'), testid: :reset_email_token_link }
- reset_message = s_('AccessTokens|Keep this token secret. Anyone who has it can create issues as if they were you. If that happens, %{link_reset_it}.') % { link_reset_it: reset_link }
2019-09-30 21:07:59 +05:30
= reset_message.html_safe
2019-12-04 20:38:33 +05:30
- if static_objects_external_storage_enabled?
2021-03-11 19:13:27 +05:30
.col-lg-12
%hr
.row.gl-mt-3.js-search-settings-section
2019-12-04 20:38:33 +05:30
.col-lg-4
2020-06-23 00:09:42 +05:30
%h4.gl-mt-0
2019-12-04 20:38:33 +05:30
= s_('AccessTokens|Static object token')
%p
2021-09-04 01:27:46 +05:30
= s_('AccessTokens|Your static object token authenticates you when repository static objects (such as archives or blobs) are served from an external storage.')
2019-12-04 20:38:33 +05:30
%p
= s_('AccessTokens|It cannot be used to access any other data.')
.col-lg-8
= label_tag :static_object_token, s_('AccessTokens|Static object token'), class: "label-bold"
2021-03-11 19:13:27 +05:30
= text_field_tag :static_object_token, current_user.static_object_token, class: 'form-control gl-form-input', readonly: true, onclick: 'this.select()'
2019-12-04 20:38:33 +05:30
%p.form-text.text-muted
- reset_link = url_for [:reset, :static_object_token, :profile]
- reset_link_start = '<a data-confirm="%{confirm}" rel="nofollow" data-method="put" href="%{url}">'.html_safe % { confirm: s_('AccessTokens|Are you sure?'), url: reset_link }
- reset_link_end = '</a>'.html_safe
2021-09-04 01:27:46 +05:30
- reset_message = s_('AccessTokens|Keep this token secret. Anyone who has it can access repository static objects as if they were you. If that ever happens, %{reset_link_start}reset this token%{reset_link_end}.') % { reset_link_start: reset_link_start, reset_link_end: reset_link_end }
2019-12-04 20:38:33 +05:30
= reset_message.html_safe