2015-04-30 17:06:18 +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?
|
|
|
|
.alert.alert-info
|
2013-10-09 13:37:37 +00:00
|
|
|
Some options are unavailable for LDAP accounts
|
|
|
|
|
2016-02-29 13:39:29 +00:00
|
|
|
.row.prepend-top-default
|
2017-06-22 14:47:50 +00:00
|
|
|
.col-lg-4.profile-settings-sidebar
|
2016-02-29 13:39:29 +00:00
|
|
|
%h4.prepend-top-0
|
2016-06-06 04:44:51 +00:00
|
|
|
Two-Factor Authentication
|
2016-02-29 13:39:29 +00:00
|
|
|
%p
|
2016-06-06 04:44:51 +00:00
|
|
|
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
|
2016-06-06 04:44:51 +00:00
|
|
|
Status: #{current_user.two_factor_enabled? ? 'Enabled' : 'Disabled'}
|
|
|
|
- if current_user.two_factor_enabled?
|
2017-04-03 23:03:14 +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
|
2016-06-06 04:44:51 +00:00
|
|
|
.append-bottom-10
|
2017-04-03 23:03:14 +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
|
|
|
|
- if button_based_providers.any?
|
|
|
|
.row.prepend-top-default
|
2017-06-22 14:47:50 +00:00
|
|
|
.col-lg-4.profile-settings-sidebar
|
2016-02-29 13:39:29 +00:00
|
|
|
%h4.prepend-top-0
|
|
|
|
Social sign-in
|
|
|
|
%p
|
|
|
|
Activate signin with one of the following services
|
2017-06-22 14:47:50 +00:00
|
|
|
.col-lg-8
|
2018-07-19 22:11:31 +00:00
|
|
|
%label.label-bold
|
2016-02-29 13:39:29 +00:00
|
|
|
Connected Accounts
|
|
|
|
%p Click on icon to activate signin with one of the following services
|
|
|
|
- button_based_providers.each do |provider|
|
|
|
|
.provider-btn-group
|
|
|
|
.provider-btn-image
|
|
|
|
= provider_image_tag(provider)
|
|
|
|
- if auth_active?(provider)
|
2017-03-28 10:33:51 +00:00
|
|
|
- if unlink_allowed?(provider)
|
2016-06-14 23:28:17 +00:00
|
|
|
= link_to unlink_profile_account_path(provider: provider), method: :delete, class: 'provider-btn' do
|
|
|
|
Disconnect
|
2017-03-28 10:33:51 +00:00
|
|
|
- else
|
|
|
|
%a.provider-btn
|
|
|
|
Active
|
2015-12-08 11:55:53 +00:00
|
|
|
- else
|
2017-01-13 21:54:16 +00:00
|
|
|
= link_to omniauth_authorize_path(:user, provider), method: :post, class: 'provider-btn not-active' do
|
2016-02-29 13:39:29 +00:00
|
|
|
Connect
|
|
|
|
%hr
|
|
|
|
- if current_user.can_change_username?
|
|
|
|
.row.prepend-top-default
|
2017-06-22 14:47:50 +00:00
|
|
|
.col-lg-4.profile-settings-sidebar
|
2016-05-16 15:42:29 +00:00
|
|
|
%h4.prepend-top-0.warning-title
|
2016-02-29 13:39:29 +00:00
|
|
|
Change username
|
|
|
|
%p
|
2017-08-29 22:33:43 +00:00
|
|
|
Changing your username can have unintended side effects.
|
|
|
|
= succeed '.' do
|
|
|
|
= link_to '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
|
|
|
|
2017-08-17 11:52:46 +00:00
|
|
|
.row.prepend-top-default
|
|
|
|
.col-lg-4.profile-settings-sidebar
|
|
|
|
%h4.prepend-top-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
|
|
|
|
- if @user.can_be_removed? && can?(current_user, :destroy_user, @user)
|
|
|
|
%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
|
|
|
|
2018-01-03 09:21:17 +00:00
|
|
|
%button#delete-account-button.btn.btn-danger.disabled{ data: { toggle: 'modal',
|
|
|
|
target: '#delete-account-modal' } }
|
|
|
|
= 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
|
|
|
|
- if @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:')
|
2017-08-17 11:52:46 +00:00
|
|
|
%strong= @user.solo_owned_groups.map(&:name).join(', ')
|
|
|
|
%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.")
|
2016-02-29 13:39:29 +00:00
|
|
|
.append-bottom-default
|