51 lines
2.6 KiB
Text
51 lines
2.6 KiB
Text
|
- breadcrumb_title s_('AccessTokens|Access Tokens')
|
||
|
- page_title _('Group Access Tokens')
|
||
|
- type = _('group access token')
|
||
|
- type_plural = _('group access tokens')
|
||
|
- @content_class = 'limit-container-width' unless fluid_layout
|
||
|
|
||
|
.row.gl-mt-3
|
||
|
.col-lg-4
|
||
|
%h4.gl-mt-0
|
||
|
= page_title
|
||
|
%p
|
||
|
- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/group/settings/group_access_tokens') }
|
||
|
- if current_user.can?(:create_resource_access_tokens, @group)
|
||
|
= _('Generate group access tokens scoped to this group for your applications that need access to the GitLab API.')
|
||
|
%p
|
||
|
= _('You can also use group access tokens with Git to authenticate over HTTP(S). %{link_start}Learn more.%{link_end}').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
|
||
|
- else
|
||
|
= _('Group access token creation is disabled in this group. You can still use and manage existing tokens. %{link_start}Learn more.%{link_end}').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
|
||
|
%p
|
||
|
- root_group = @group.root_ancestor
|
||
|
- if current_user.can?(:admin_group, root_group)
|
||
|
- group_settings_link = edit_group_path(root_group)
|
||
|
- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: group_settings_link }
|
||
|
= _('You can enable group access token creation in %{link_start}group settings%{link_end}.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
|
||
|
|
||
|
.col-lg-8
|
||
|
- if @new_resource_access_token
|
||
|
= render 'shared/access_tokens/created_container',
|
||
|
type: type,
|
||
|
new_token_value: @new_resource_access_token
|
||
|
|
||
|
- if current_user.can?(:create_resource_access_tokens, @group)
|
||
|
= render 'shared/access_tokens/form',
|
||
|
type: type,
|
||
|
path: group_settings_access_tokens_path(@group),
|
||
|
resource: @group,
|
||
|
token: @resource_access_token,
|
||
|
scopes: @scopes,
|
||
|
access_levels: GroupMember.access_level_roles,
|
||
|
default_access_level: Gitlab::Access::MAINTAINER,
|
||
|
prefix: :resource_access_token,
|
||
|
help_path: help_page_path('user/group/settings/group_access_tokens', anchor: 'scopes-for-a-group-access-token')
|
||
|
|
||
|
= render 'shared/access_tokens/table',
|
||
|
active_tokens: @active_resource_access_tokens,
|
||
|
resource: @group,
|
||
|
type: type,
|
||
|
type_plural: type_plural,
|
||
|
revoke_route_helper: ->(token) { revoke_group_settings_access_token_path(id: token) },
|
||
|
no_active_tokens_message: _('This group has no active access tokens.')
|