2020-05-15 09:07:59 +00:00
|
|
|
- add_to_breadcrumbs 'Users', admin_users_path
|
2018-06-09 06:45:05 +00:00
|
|
|
- breadcrumb_title @user.name
|
2020-05-15 09:07:59 +00:00
|
|
|
- page_title _('Impersonation Tokens'), @user.name, _('Users')
|
|
|
|
- type = _('impersonation token')
|
|
|
|
- type_plural = _('impersonation tokens')
|
|
|
|
|
2017-02-23 17:47:06 +00:00
|
|
|
= render 'admin/users/head'
|
|
|
|
|
2020-06-26 06:09:03 +00:00
|
|
|
.row.gl-mt-3
|
2017-02-23 17:47:06 +00:00
|
|
|
.col-lg-12
|
2018-11-08 15:03:56 +00:00
|
|
|
- if @new_impersonation_token
|
2020-05-15 09:07:59 +00:00
|
|
|
= render 'shared/access_tokens/created_container',
|
|
|
|
type: type,
|
|
|
|
new_token_value: @new_impersonation_token
|
2018-11-08 15:03:56 +00:00
|
|
|
|
2020-05-15 09:07:59 +00:00
|
|
|
= render 'shared/access_tokens/form',
|
|
|
|
type: type,
|
|
|
|
title: _('Add an impersonation token'),
|
|
|
|
path: admin_user_impersonation_tokens_path,
|
|
|
|
impersonation: true,
|
|
|
|
token: @impersonation_token,
|
|
|
|
scopes: @scopes
|
2017-02-23 17:47:06 +00:00
|
|
|
|
2020-05-15 09:07:59 +00:00
|
|
|
= render 'shared/access_tokens/table',
|
|
|
|
type: type,
|
|
|
|
type_plural: type_plural,
|
|
|
|
impersonation: true,
|
|
|
|
active_tokens: @active_impersonation_tokens,
|
|
|
|
revoke_route_helper: ->(token) { revoke_admin_user_impersonation_token_path(token.user, token) }
|