2013-07-13 05:45:48 +00:00
|
|
|
%h3.page-title
|
2013-10-16 17:19:25 +00:00
|
|
|
%span.cgray User:
|
2013-06-26 12:57:02 +00:00
|
|
|
= @user.name
|
|
|
|
- if @user.blocked?
|
2013-06-13 18:06:27 +00:00
|
|
|
%span.cred (Blocked)
|
2013-06-26 12:57:02 +00:00
|
|
|
- if @user.admin
|
2013-06-13 18:06:27 +00:00
|
|
|
%span.cred (Admin)
|
|
|
|
|
|
|
|
.pull-right
|
2013-08-27 10:44:58 +00:00
|
|
|
= link_to edit_admin_user_path(@user), class: "btn grouped" do
|
2013-06-13 18:06:27 +00:00
|
|
|
%i.icon-edit
|
|
|
|
Edit
|
|
|
|
%hr
|
|
|
|
|
2013-02-13 17:14:35 +00:00
|
|
|
.row
|
2013-12-30 21:55:15 +00:00
|
|
|
.col-md-6
|
2013-06-13 18:06:27 +00:00
|
|
|
.ui-box
|
2013-07-13 17:36:21 +00:00
|
|
|
.title
|
2013-06-13 18:06:27 +00:00
|
|
|
Account:
|
|
|
|
.pull-right
|
2013-10-06 18:13:56 +00:00
|
|
|
= image_tag avatar_icon(@user.email, 32), class: "avatar s32"
|
2013-06-13 18:06:27 +00:00
|
|
|
%ul.well-list
|
|
|
|
%li
|
|
|
|
%span.light Name:
|
2013-06-26 12:57:02 +00:00
|
|
|
%strong= @user.name
|
2013-06-13 18:06:27 +00:00
|
|
|
%li
|
|
|
|
%span.light Username:
|
|
|
|
%strong
|
2013-06-26 12:57:02 +00:00
|
|
|
= @user.username
|
2013-06-13 18:06:27 +00:00
|
|
|
%li
|
|
|
|
%span.light Email:
|
|
|
|
%strong
|
2013-06-26 12:57:02 +00:00
|
|
|
= mail_to @user.email
|
2013-09-14 17:55:33 +00:00
|
|
|
%li
|
|
|
|
%span.light Can create groups:
|
|
|
|
%strong
|
|
|
|
= @user.can_create_group ? "Yes" : "No"
|
|
|
|
%li
|
|
|
|
%span.light Personal projects limit:
|
|
|
|
%strong
|
|
|
|
= @user.projects_limit
|
2013-06-13 18:06:27 +00:00
|
|
|
%li
|
|
|
|
%span.light Member since:
|
|
|
|
%strong
|
2013-06-26 12:57:02 +00:00
|
|
|
= @user.created_at.stamp("Nov 12, 2031")
|
2013-12-26 08:20:36 +00:00
|
|
|
- if @user.confirmed_at
|
|
|
|
%li
|
|
|
|
%span.light Confirmed at:
|
|
|
|
%strong
|
|
|
|
= @user.confirmed_at.stamp("Nov 12, 2031")
|
|
|
|
- else
|
|
|
|
%li
|
|
|
|
%span.light Confirmed:
|
|
|
|
%strong.cred
|
|
|
|
No
|
2013-06-13 18:06:27 +00:00
|
|
|
|
|
|
|
%li
|
|
|
|
%span.light Last sign-in at:
|
|
|
|
%strong
|
2013-06-26 12:57:02 +00:00
|
|
|
- if @user.last_sign_in_at
|
|
|
|
= @user.last_sign_in_at.stamp("Nov 12, 2031")
|
2013-06-14 05:37:55 +00:00
|
|
|
- else
|
|
|
|
never
|
2013-06-13 18:06:27 +00:00
|
|
|
|
2013-06-26 12:57:02 +00:00
|
|
|
- if @user.ldap_user?
|
2013-06-13 18:06:27 +00:00
|
|
|
%li
|
|
|
|
%span.light LDAP uid:
|
|
|
|
%strong
|
2013-06-26 12:57:02 +00:00
|
|
|
= @user.extern_uid
|
2013-06-13 18:06:27 +00:00
|
|
|
|
2013-06-26 12:57:02 +00:00
|
|
|
- if @user.created_by
|
2013-06-13 18:06:27 +00:00
|
|
|
%li
|
|
|
|
%span.light Created by:
|
|
|
|
%strong
|
2013-06-26 12:57:02 +00:00
|
|
|
= link_to @user.created_by.name, [:admin, @user.created_by]
|
2013-06-13 18:06:27 +00:00
|
|
|
|
2013-08-27 17:40:42 +00:00
|
|
|
- unless @user == current_user
|
2013-10-16 17:19:25 +00:00
|
|
|
- if @user.blocked?
|
|
|
|
.alert.alert-info
|
|
|
|
%h4 This user is blocked
|
|
|
|
%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
|
2014-01-31 11:04:14 +00:00
|
|
|
%br
|
2013-12-10 11:46:50 +00:00
|
|
|
= link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn btn-new", data: { confirm: 'Are you sure?' }
|
2013-10-16 17:19:25 +00:00
|
|
|
- else
|
2014-01-31 11:04:14 +00:00
|
|
|
.alert.alert-warning
|
2013-10-16 17:19:25 +00:00
|
|
|
%h4 Block this user
|
|
|
|
%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
|
2014-01-31 11:04:14 +00:00
|
|
|
%br
|
2013-12-10 11:46:50 +00:00
|
|
|
= link_to 'Block user', block_admin_user_path(@user), data: { confirm: 'USER WILL BE BLOCKED! Are you sure?' }, method: :put, class: "btn btn-remove"
|
2013-08-27 17:40:42 +00:00
|
|
|
|
2013-12-31 14:34:14 +00:00
|
|
|
.alert.alert-danger
|
2013-08-27 17:40:42 +00:00
|
|
|
%h4
|
|
|
|
Remove user
|
|
|
|
%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
|
|
|
|
- if @user.solo_owned_groups.present?
|
|
|
|
%li
|
|
|
|
Next groups with all content will be removed:
|
|
|
|
%strong #{@user.solo_owned_groups.map(&:name).join(', ')}
|
2014-01-31 11:04:14 +00:00
|
|
|
%br
|
2013-12-10 11:46:50 +00:00
|
|
|
= link_to 'Remove user', [:admin, @user], data: { confirm: "USER #{@user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "btn btn-remove"
|
2013-08-27 10:44:58 +00:00
|
|
|
|
2013-12-30 21:55:15 +00:00
|
|
|
.col-md-6
|
2013-06-26 12:57:02 +00:00
|
|
|
- if @user.users_groups.present?
|
2013-02-13 17:14:35 +00:00
|
|
|
.ui-box
|
2013-07-13 17:36:21 +00:00
|
|
|
.title Groups:
|
2013-02-13 17:14:35 +00:00
|
|
|
%ul.well-list
|
2013-06-26 12:57:02 +00:00
|
|
|
- @user.users_groups.each do |user_group|
|
2013-06-22 11:11:20 +00:00
|
|
|
- group = user_group.group
|
2013-08-27 18:35:41 +00:00
|
|
|
%li.users_group
|
2013-02-13 17:14:35 +00:00
|
|
|
%strong= link_to group.name, admin_group_path(group)
|
2013-06-22 11:11:20 +00:00
|
|
|
.pull-right
|
|
|
|
%span.light= user_group.human_access
|
2013-08-27 18:35:41 +00:00
|
|
|
- unless user_group.owner?
|
2013-12-10 11:46:50 +00:00
|
|
|
= link_to group_users_group_path(group, user_group), data: { confirm: remove_user_from_group_message(group, @user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do
|
2013-08-27 18:35:41 +00:00
|
|
|
%i.icon-remove.icon-white
|
2012-04-16 20:33:03 +00:00
|
|
|
|
2013-02-13 17:14:35 +00:00
|
|
|
.ui-box
|
2013-07-13 17:36:21 +00:00
|
|
|
.title Projects (#{@projects.count})
|
2013-02-13 17:14:35 +00:00
|
|
|
%ul.well-list
|
2013-05-08 17:11:49 +00:00
|
|
|
- @projects.sort_by(&:name_with_namespace).each do |project|
|
2013-06-26 12:57:02 +00:00
|
|
|
- tm = project.team.find_tm(@user.id)
|
2013-08-27 18:35:41 +00:00
|
|
|
%li.users_project
|
2013-02-13 17:14:35 +00:00
|
|
|
= link_to admin_project_path(project), class: dom_class(project) do
|
2013-10-10 07:53:49 +00:00
|
|
|
= project.name_with_namespace
|
2013-06-13 18:06:27 +00:00
|
|
|
|
|
|
|
- if tm
|
|
|
|
.pull-right
|
2013-08-27 09:47:28 +00:00
|
|
|
- if tm.owner?
|
|
|
|
%span.light Owner
|
|
|
|
- else
|
|
|
|
%span.light= tm.human_access
|
2013-08-27 18:35:41 +00:00
|
|
|
|
|
|
|
- if tm.respond_to? :project
|
2013-12-10 11:46:50 +00:00
|
|
|
= link_to project_team_member_path(project, @user), data: { confirm: remove_from_project_team_message(project, @user) }, remote: true, method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from project' do
|
2013-08-27 18:35:41 +00:00
|
|
|
%i.icon-remove
|