2015-04-30 13:06:18 -04:00
|
|
|
- page_title @user.name, "Users"
|
2015-06-23 04:26:50 -04:00
|
|
|
= render 'admin/users/head'
|
2015-06-22 11:12:20 -04:00
|
|
|
|
|
|
|
.row
|
|
|
|
.col-md-6
|
|
|
|
.panel.panel-default
|
|
|
|
.panel-heading
|
|
|
|
= @user.name
|
|
|
|
%ul.well-list
|
|
|
|
%li
|
2015-10-12 11:03:12 -04:00
|
|
|
= image_tag avatar_icon(@user, 60), class: "avatar s60"
|
2015-06-22 11:12:20 -04:00
|
|
|
%li
|
|
|
|
%span.light Profile page:
|
|
|
|
%strong
|
|
|
|
= link_to user_path(@user) do
|
|
|
|
= @user.username
|
2015-10-16 07:24:28 -04:00
|
|
|
= render 'admin/users/profile', user: @user
|
2015-06-22 11:12:20 -04:00
|
|
|
|
|
|
|
.panel.panel-default
|
|
|
|
.panel-heading
|
|
|
|
Account:
|
|
|
|
%ul.well-list
|
|
|
|
%li
|
|
|
|
%span.light Name:
|
|
|
|
%strong= @user.name
|
|
|
|
%li
|
|
|
|
%span.light Username:
|
|
|
|
%strong
|
|
|
|
= @user.username
|
|
|
|
%li
|
|
|
|
%span.light Email:
|
|
|
|
%strong
|
|
|
|
= mail_to @user.email
|
|
|
|
- @user.emails.each do |email|
|
|
|
|
%li
|
|
|
|
%span.light Secondary email:
|
|
|
|
%strong= email.email
|
|
|
|
= link_to remove_email_admin_user_path(@user, email), data: { confirm: "Are you sure you want to remove #{email.email}?" }, method: :delete, class: "btn-xs btn btn-remove pull-right", title: 'Remove secondary email', id: "remove_email_#{email.id}" do
|
|
|
|
%i.fa.fa-times
|
|
|
|
|
2015-06-22 12:00:11 -04:00
|
|
|
%li.two-factor-status
|
|
|
|
%span.light Two-factor Authentication:
|
2016-12-26 05:47:16 -05:00
|
|
|
%strong{ class: @user.two_factor_enabled? ? 'cgreen' : 'cred' }
|
2015-06-22 12:00:11 -04:00
|
|
|
- if @user.two_factor_enabled?
|
|
|
|
Enabled
|
2015-07-10 17:11:39 -04:00
|
|
|
= link_to 'Disable', disable_two_factor_admin_user_path(@user), data: {confirm: 'Are you sure?'}, method: :patch, class: 'btn btn-xs btn-remove pull-right', title: 'Disable Two-factor Authentication'
|
2013-06-14 01:37:55 -04:00
|
|
|
- else
|
2015-06-22 12:00:11 -04:00
|
|
|
Disabled
|
|
|
|
|
2016-03-10 16:08:11 -05:00
|
|
|
%li
|
|
|
|
%span.light External User:
|
|
|
|
%strong
|
|
|
|
= @user.external? ? "Yes" : "No"
|
2015-06-22 11:12:20 -04:00
|
|
|
%li
|
|
|
|
%span.light Can create groups:
|
|
|
|
%strong
|
|
|
|
= @user.can_create_group ? "Yes" : "No"
|
|
|
|
%li
|
|
|
|
%span.light Personal projects limit:
|
|
|
|
%strong
|
|
|
|
= @user.projects_limit
|
|
|
|
%li
|
|
|
|
%span.light Member since:
|
|
|
|
%strong
|
2016-01-06 17:27:56 -05:00
|
|
|
= @user.created_at.to_s(:medium)
|
2015-06-22 11:12:20 -04:00
|
|
|
- if @user.confirmed_at
|
|
|
|
%li
|
|
|
|
%span.light Confirmed at:
|
|
|
|
%strong
|
2016-01-06 17:27:56 -05:00
|
|
|
= @user.confirmed_at.to_s(:medium)
|
2015-06-22 11:12:20 -04:00
|
|
|
- else
|
|
|
|
%li
|
|
|
|
%span.light Confirmed:
|
|
|
|
%strong.cred
|
|
|
|
No
|
|
|
|
|
2016-01-12 03:57:05 -05:00
|
|
|
%li
|
|
|
|
%span.light Current sign-in IP:
|
|
|
|
%strong
|
|
|
|
- if @user.current_sign_in_ip
|
|
|
|
= @user.current_sign_in_ip
|
|
|
|
- else
|
|
|
|
never
|
|
|
|
|
2015-06-22 11:12:20 -04:00
|
|
|
%li
|
|
|
|
%span.light Current sign-in at:
|
|
|
|
%strong
|
|
|
|
- if @user.current_sign_in_at
|
2016-01-06 17:27:56 -05:00
|
|
|
= @user.current_sign_in_at.to_s(:medium)
|
2013-06-14 01:37:55 -04:00
|
|
|
- else
|
2015-06-22 11:12:20 -04:00
|
|
|
never
|
2013-08-27 13:40:42 -04:00
|
|
|
|
2016-01-12 03:57:05 -05:00
|
|
|
%li
|
|
|
|
%span.light Last sign-in IP:
|
|
|
|
%strong
|
|
|
|
- if @user.last_sign_in_ip
|
|
|
|
= @user.last_sign_in_ip
|
|
|
|
- else
|
|
|
|
never
|
|
|
|
|
2015-06-22 11:12:20 -04:00
|
|
|
%li
|
|
|
|
%span.light Last sign-in at:
|
|
|
|
%strong
|
|
|
|
- if @user.last_sign_in_at
|
2016-01-06 17:27:56 -05:00
|
|
|
= @user.last_sign_in_at.to_s(:medium)
|
2015-06-22 11:12:20 -04:00
|
|
|
- else
|
|
|
|
never
|
|
|
|
|
|
|
|
%li
|
|
|
|
%span.light Sign-in count:
|
|
|
|
%strong
|
|
|
|
= @user.sign_in_count
|
|
|
|
|
|
|
|
- if @user.ldap_user?
|
|
|
|
%li
|
|
|
|
%span.light LDAP uid:
|
|
|
|
%strong
|
|
|
|
= @user.ldap_identity.extern_uid
|
|
|
|
|
|
|
|
- if @user.created_by
|
|
|
|
%li
|
|
|
|
%span.light Created by:
|
|
|
|
%strong
|
|
|
|
= link_to @user.created_by.name, [:admin, @user.created_by]
|
|
|
|
|
|
|
|
.col-md-6
|
|
|
|
- unless @user == current_user
|
2015-07-29 10:32:01 -04:00
|
|
|
- unless @user.confirmed?
|
|
|
|
.panel.panel-info
|
|
|
|
.panel-heading
|
|
|
|
Confirm user
|
|
|
|
.panel-body
|
|
|
|
- if @user.unconfirmed_email.present?
|
|
|
|
- email = " (#{@user.unconfirmed_email})"
|
|
|
|
%p This user has an unconfirmed email address#{email}. You may force a confirmation.
|
|
|
|
%br
|
|
|
|
= link_to 'Confirm user', confirm_admin_user_path(@user), method: :put, class: "btn btn-info", data: { confirm: 'Are you sure?' }
|
2015-06-22 11:12:20 -04:00
|
|
|
- if @user.blocked?
|
|
|
|
.panel.panel-info
|
2014-06-03 05:44:22 -04:00
|
|
|
.panel-heading
|
2015-06-22 11:12:20 -04:00
|
|
|
This user is blocked
|
|
|
|
.panel-body
|
2016-07-31 11:34:27 -04:00
|
|
|
%p A blocked user cannot:
|
2015-06-22 11:12:20 -04:00
|
|
|
%ul
|
2016-07-31 11:34:27 -04:00
|
|
|
%li Log in
|
|
|
|
%li Access Git repositories
|
2015-06-22 11:12:20 -04:00
|
|
|
%br
|
|
|
|
= link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn btn-info", data: { confirm: 'Are you sure?' }
|
|
|
|
- else
|
|
|
|
.panel.panel-warning
|
|
|
|
.panel-heading
|
|
|
|
Block this user
|
|
|
|
.panel-body
|
|
|
|
%p Blocking user has the following effects:
|
|
|
|
%ul
|
|
|
|
%li User will not be able to login
|
|
|
|
%li User will not be able to access git repositories
|
|
|
|
%li User will be removed from joined projects and groups
|
|
|
|
%li Personal projects will be left
|
|
|
|
%li Owned groups will be left
|
|
|
|
%br
|
|
|
|
= link_to 'Block user', block_admin_user_path(@user), data: { confirm: 'USER WILL BE BLOCKED! Are you sure?' }, method: :put, class: "btn btn-warning"
|
2015-07-02 01:26:14 -04:00
|
|
|
- if @user.access_locked?
|
|
|
|
.panel.panel-info
|
|
|
|
.panel-heading
|
|
|
|
This account has been locked
|
|
|
|
.panel-body
|
|
|
|
%p This user has been temporarily locked due to excessive number of failed logins. You may manually unlock the account.
|
|
|
|
%br
|
|
|
|
= link_to 'Unlock user', unlock_admin_user_path(@user), method: :put, class: "btn btn-info", data: { confirm: 'Are you sure?' }
|
2015-06-22 11:12:20 -04:00
|
|
|
|
|
|
|
.panel.panel-danger
|
|
|
|
.panel-heading
|
|
|
|
Remove user
|
|
|
|
.panel-body
|
2017-02-17 09:58:12 -05:00
|
|
|
- if @user.can_be_removed? && can?(current_user, :destroy_user, @user)
|
2015-06-22 11:12:20 -04:00
|
|
|
%p Deleting a user has the following effects:
|
|
|
|
%ul
|
|
|
|
%li All user content like authored issues, snippets, comments will be removed
|
|
|
|
- rp = @user.personal_projects.count
|
|
|
|
- unless rp.zero?
|
|
|
|
%li #{pluralize rp, 'personal project'} will be removed and cannot be restored
|
|
|
|
%br
|
|
|
|
= link_to 'Remove user', [:admin, @user], data: { confirm: "USER #{@user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "btn btn-remove"
|
|
|
|
- else
|
|
|
|
- if @user.solo_owned_groups.present?
|
|
|
|
%p
|
|
|
|
This user is currently an owner in these groups:
|
2017-01-13 11:07:21 -05:00
|
|
|
%strong= @user.solo_owned_groups.map(&:name).join(', ')
|
2015-06-22 11:12:20 -04:00
|
|
|
%p
|
|
|
|
You must transfer ownership or delete these groups before you can delete this user.
|
2017-02-17 09:58:12 -05:00
|
|
|
- else
|
|
|
|
%p
|
|
|
|
You don't have access to delete this user.
|