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