2019-01-15 17:03:07 -05:00
|
|
|
- page_title _('Account')
|
2017-06-22 10:47:50 -04:00
|
|
|
- @content_class = "limit-container-width" unless fluid_layout
|
2015-09-09 17:05:47 -04:00
|
|
|
|
2015-03-21 20:44:40 -04:00
|
|
|
- if current_user.ldap_user?
|
|
|
|
.alert.alert-info
|
2019-01-15 17:03:07 -05:00
|
|
|
= s_('Profiles|Some options are unavailable for LDAP accounts')
|
2013-10-09 09:37:37 -04:00
|
|
|
|
2016-02-29 08:39:29 -05:00
|
|
|
.row.prepend-top-default
|
2017-06-22 10:47:50 -04:00
|
|
|
.col-lg-4.profile-settings-sidebar
|
2016-02-29 08:39:29 -05:00
|
|
|
%h4.prepend-top-0
|
2019-01-15 17:03:07 -05:00
|
|
|
= s_('Profiles|Two-Factor Authentication')
|
2016-02-29 08:39:29 -05:00
|
|
|
%p
|
2019-01-15 17:03:07 -05:00
|
|
|
= s_("Profiles|Increase your account's security by enabling Two-Factor Authentication (2FA)")
|
2017-06-22 10:47:50 -04:00
|
|
|
.col-lg-8
|
2016-02-29 08:39:29 -05:00
|
|
|
%p
|
2019-01-15 17:03:07 -05:00
|
|
|
#{_('Status')}: #{current_user.two_factor_enabled? ? _('Enabled') : _('Disabled')}
|
2016-06-06 00:44:51 -04:00
|
|
|
- if current_user.two_factor_enabled?
|
2019-01-15 17:03:07 -05:00
|
|
|
= link_to _('Manage two-factor authentication'), profile_two_factor_auth_path, class: 'btn btn-info'
|
2016-03-02 12:34:31 -05:00
|
|
|
- else
|
2016-06-06 00:44:51 -04:00
|
|
|
.append-bottom-10
|
2019-01-15 17:03:07 -05:00
|
|
|
= link_to _('Enable two-factor authentication'), profile_two_factor_auth_path, class: 'btn btn-success'
|
2016-06-06 00:44:51 -04:00
|
|
|
|
2016-02-29 08:39:29 -05:00
|
|
|
%hr
|
2018-12-04 05:31:11 -05:00
|
|
|
- if display_providers_on_profile?
|
2016-02-29 08:39:29 -05:00
|
|
|
.row.prepend-top-default
|
2017-06-22 10:47:50 -04:00
|
|
|
.col-lg-4.profile-settings-sidebar
|
2016-02-29 08:39:29 -05:00
|
|
|
%h4.prepend-top-0
|
2019-01-15 17:03:07 -05:00
|
|
|
= s_('Profiles|Social sign-in')
|
2016-02-29 08:39:29 -05:00
|
|
|
%p
|
2019-01-15 17:03:07 -05:00
|
|
|
= s_('Profiles|Activate signin with one of the following services')
|
2017-06-22 10:47:50 -04:00
|
|
|
.col-lg-8
|
2019-03-18 10:36:34 -04:00
|
|
|
= render 'providers', providers: button_based_providers, group_saml_identities: local_assigns[:group_saml_identities]
|
2016-02-29 08:39:29 -05:00
|
|
|
%hr
|
|
|
|
- if current_user.can_change_username?
|
|
|
|
.row.prepend-top-default
|
2017-06-22 10:47:50 -04:00
|
|
|
.col-lg-4.profile-settings-sidebar
|
2016-05-16 11:42:29 -04:00
|
|
|
%h4.prepend-top-0.warning-title
|
2019-01-15 17:03:07 -05:00
|
|
|
= s_('Profiles|Change username')
|
2016-02-29 08:39:29 -05:00
|
|
|
%p
|
2019-01-15 17:03:07 -05:00
|
|
|
= s_('Profiles|Changing your username can have unintended side effects.')
|
2017-08-29 18:33:43 -04:00
|
|
|
= succeed '.' do
|
2019-01-15 17:03:07 -05:00
|
|
|
= link_to s_('Profiles|Learn more'), help_page_path('user/profile/index', anchor: 'changing-your-username'), target: '_blank'
|
2017-06-22 10:47:50 -04:00
|
|
|
.col-lg-8
|
2018-04-06 05:36:22 -04:00
|
|
|
- data = { initial_username: current_user.username, root_url: root_url, action_url: update_username_profile_path(format: :json) }
|
|
|
|
#update-username{ data: data }
|
2016-02-29 08:39:29 -05:00
|
|
|
%hr
|
2013-10-09 09:37:37 -04:00
|
|
|
|
2017-08-17 07:52:46 -04:00
|
|
|
.row.prepend-top-default
|
|
|
|
.col-lg-4.profile-settings-sidebar
|
|
|
|
%h4.prepend-top-0.danger-title
|
2017-10-06 16:40:41 -04:00
|
|
|
= s_('Profiles|Delete account')
|
2017-08-17 07:52:46 -04:00
|
|
|
.col-lg-8
|
2018-12-04 05:17:21 -05:00
|
|
|
- if current_user.can_be_removed? && can?(current_user, :destroy_user, current_user)
|
2017-08-17 07:52:46 -04:00
|
|
|
%p
|
2017-10-06 16:40:41 -04:00
|
|
|
= s_('Profiles|Deleting an account has the following effects:')
|
2017-08-17 07:52:46 -04:00
|
|
|
= render 'users/deletion_guidance', user: current_user
|
2017-10-06 16:40:41 -04:00
|
|
|
|
2018-01-03 04:21:17 -05:00
|
|
|
%button#delete-account-button.btn.btn-danger.disabled{ data: { toggle: 'modal',
|
|
|
|
target: '#delete-account-modal' } }
|
|
|
|
= s_('Profiles|Delete account')
|
|
|
|
|
2017-10-06 16:40:41 -04:00
|
|
|
#delete-account-modal{ data: { action_url: user_registration_path,
|
|
|
|
confirm_with_password: ('true' if current_user.confirm_deletion_with_password?),
|
|
|
|
username: current_user.username } }
|
2017-08-17 07:52:46 -04:00
|
|
|
- else
|
2018-12-04 05:17:21 -05:00
|
|
|
- if current_user.solo_owned_groups.present?
|
2016-02-03 13:31:12 -05:00
|
|
|
%p
|
2017-10-06 16:40:41 -04:00
|
|
|
= s_('Profiles|Your account is currently an owner in these groups:')
|
2018-12-04 05:17:21 -05:00
|
|
|
%strong= current_user.solo_owned_groups.map(&:name).join(', ')
|
2017-08-17 07:52:46 -04:00
|
|
|
%p
|
2017-10-06 16:40:41 -04:00
|
|
|
= s_('Profiles|You must transfer ownership or delete these groups before you can delete your account.')
|
2016-02-03 13:31:12 -05:00
|
|
|
- else
|
2017-08-17 07:52:46 -04:00
|
|
|
%p
|
2017-10-06 16:40:41 -04:00
|
|
|
= s_("Profiles|You don't have access to delete this user.")
|
2016-02-29 08:39:29 -05:00
|
|
|
.append-bottom-default
|