2015-04-30 13:06:18 -04:00
- page_title "Account"
2017-06-22 10:47:50 -04:00
- @content_class = "limit-container-width" unless fluid_layout
2016-06-30 12:42:07 -04:00
= render 'profiles/head'
2015-09-09 17:05:47 -04:00
2015-03-21 20:44:40 -04:00
- if current_user.ldap_user?
.alert.alert-info
2013-10-09 09:37:37 -04:00
Some options are unavailable for LDAP accounts
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
2017-05-23 11:02:05 -04:00
Private Tokens
2016-02-29 08:39:29 -05:00
%p
2017-05-23 11:02:05 -04:00
Keep these tokens secret, anyone with access to them can interact with
GitLab as if they were you.
2017-06-22 10:47:50 -04:00
.col-lg-8.private-tokens-reset
2017-05-23 11:38:39 -04:00
= render partial: 'reset_token', locals: { label: 'Private token', button_label: 'Reset private token', help_text: 'Your private token is used to access the API and Atom feeds without username/password authentication.' }
2017-05-23 10:55:23 -04:00
2017-05-23 11:38:39 -04:00
= render partial: 'reset_token', locals: { label: 'RSS token', button_label: 'Reset RSS token', help_text: 'Your RSS token is used to create urls for personalized RSS feeds.' }
2017-05-23 11:02:05 -04:00
2016-10-18 14:03:31 -04:00
- if incoming_email_token_enabled?
2017-05-23 11:38:39 -04:00
= render partial: 'reset_token', locals: { label: 'Incoming email token', button_label: 'Reset incoming email token', help_text: 'Your incoming email token is used to create new issues by email, and is included in your project-specific email addresses.' }
2016-08-19 19:33:46 -04:00
2016-02-29 08:39:29 -05:00
%hr
.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
2016-06-06 00:44:51 -04:00
Two-Factor Authentication
2016-02-29 08:39:29 -05:00
%p
2016-06-06 00:44:51 -04:00
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
2016-06-06 00:44:51 -04:00
Status: #{current_user.two_factor_enabled? ? 'Enabled' : 'Disabled'}
- if current_user.two_factor_enabled?
2017-04-03 19:03:14 -04:00
= link_to 'Manage two-factor authentication', profile_two_factor_auth_path, class: 'btn btn-info'
2016-06-06 00:44:51 -04:00
= link_to 'Disable', profile_two_factor_auth_path,
method: :delete,
data: { confirm: "Are you sure? This will invalidate your registered applications and U2F devices." },
class: 'btn btn-danger'
2016-03-02 12:34:31 -05:00
- else
2016-06-06 00:44:51 -04:00
.append-bottom-10
2017-04-03 19:03:14 -04: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
- if button_based_providers.any?
.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
Social sign-in
%p
Activate signin with one of the following services
2017-06-22 10:47:50 -04:00
.col-lg-8
2016-02-29 08:39:29 -05:00
%label.label-light
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 06:33:51 -04:00
- if unlink_allowed?(provider)
2016-06-14 19:28:17 -04:00
= link_to unlink_profile_account_path(provider: provider), method: :delete, class: 'provider-btn' do
Disconnect
2017-03-28 06:33:51 -04:00
- else
%a.provider-btn
Active
2015-12-08 06:55:53 -05:00
- else
2017-01-13 16:54:16 -05:00
= link_to omniauth_authorize_path(:user, provider), method: :post, class: 'provider-btn not-active' do
2016-02-29 08:39:29 -05:00
Connect
%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
2016-02-29 08:39:29 -05:00
Change username
%p
Changing your username will change path to all personal projects!
2017-06-22 10:47:50 -04:00
.col-lg-8
2017-02-28 12:14:57 -05:00
= form_for @user, url: update_username_profile_path, method: :put, html: {class: "update-username"} do |f|
2016-02-29 08:39:29 -05:00
.form-group
= f.label :username, "Path", class: "label-light"
.input-group
.input-group-addon
2016-10-14 06:26:43 -04:00
= root_url
2016-02-29 08:39:29 -05:00
= f.text_field :username, required: true, class: 'form-control'
.help-block
Current path:
2017-01-15 11:20:13 -05:00
#{root_url}#{current_user.username}
2016-02-29 08:39:29 -05:00
.prepend-top-default
= f.button class: "btn btn-warning", type: "submit" do
= icon "spinner spin", class: "hidden loading-username"
Update username
%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
Remove account
.col-lg-8
- if @user.can_be_removed? && can?(current_user, :destroy_user, @user)
%p
Deleting an account has the following effects:
= render 'users/deletion_guidance', user: current_user
= link_to 'Delete account', user_registration_path, data: { confirm: "REMOVE #{current_user.name}? Are you sure?" }, method: :delete, class: "btn btn-remove"
- else
- if @user.solo_owned_groups.present?
2016-02-03 13:31:12 -05:00
%p
2017-08-17 07:52:46 -04:00
Your account is currently an owner in these groups:
%strong= @user.solo_owned_groups.map(&:name).join(', ')
%p
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
You don't have access to delete this user.
2016-02-29 08:39:29 -05:00
.append-bottom-default