Show More
@@ -1,171 +1,171 b'' | |||||
1 | <%namespace name="base" file="/base/base.mako"/> |
|
1 | <%namespace name="base" file="/base/base.mako"/> | |
2 |
|
2 | |||
3 | <% |
|
3 | <% | |
4 | elems = [ |
|
4 | elems = [ | |
5 | (_('User ID'), c.user.user_id, '', ''), |
|
5 | (_('User ID'), c.user.user_id, '', ''), | |
6 | (_('Created on'), h.format_date(c.user.created_on), '', ''), |
|
6 | (_('Created on'), h.format_date(c.user.created_on), '', ''), | |
7 | (_('Source of Record'), c.user.extern_type, '', ''), |
|
7 | (_('Source of Record'), c.user.extern_type, '', ''), | |
8 |
|
8 | |||
9 | (_('Last login'), c.user.last_login or '-', '', ''), |
|
9 | (_('Last login'), c.user.last_login or '-', '', ''), | |
10 | (_('Last activity'), c.user.last_activity, '', ''), |
|
10 | (_('Last activity'), c.user.last_activity, '', ''), | |
11 |
|
11 | |||
12 | (_('Repositories'), len(c.user.repositories), '', [x.repo_name for x in c.user.repositories]), |
|
12 | (_('Repositories'), len(c.user.repositories), '', [x.repo_name for x in c.user.repositories]), | |
13 | (_('Repository groups'), len(c.user.repository_groups), '', [x.group_name for x in c.user.repository_groups]), |
|
13 | (_('Repository groups'), len(c.user.repository_groups), '', [x.group_name for x in c.user.repository_groups]), | |
14 | (_('User groups'), len(c.user.user_groups), '', [x.users_group_name for x in c.user.user_groups]), |
|
14 | (_('User groups'), len(c.user.user_groups), '', [x.users_group_name for x in c.user.user_groups]), | |
15 |
|
15 | |||
16 | (_('Reviewer of pull requests'), len(c.user.reviewer_pull_requests), '', ['Pull Request #{}'.format(x.pull_request.pull_request_id) for x in c.user.reviewer_pull_requests]), |
|
16 | (_('Reviewer of pull requests'), len(c.user.reviewer_pull_requests), '', ['Pull Request #{}'.format(x.pull_request.pull_request_id) for x in c.user.reviewer_pull_requests]), | |
17 | (_('Assigned to review rules'), len(c.user_to_review_rules), '', [x for x in c.user_to_review_rules]), |
|
17 | (_('Assigned to review rules'), len(c.user_to_review_rules), '', [x for x in c.user_to_review_rules]), | |
18 |
|
18 | |||
19 | (_('Member of User groups'), len(c.user.group_member), '', [x.users_group.users_group_name for x in c.user.group_member]), |
|
19 | (_('Member of User groups'), len(c.user.group_member), '', [x.users_group.users_group_name for x in c.user.group_member]), | |
20 | (_('Force password change'), c.user.user_data.get('force_password_change', 'False'), '', ''), |
|
20 | (_('Force password change'), c.user.user_data.get('force_password_change', 'False'), '', ''), | |
21 | ] |
|
21 | ] | |
22 | %> |
|
22 | %> | |
23 |
|
23 | |||
24 | <div class="panel panel-default"> |
|
24 | <div class="panel panel-default"> | |
25 | <div class="panel-heading"> |
|
25 | <div class="panel-heading"> | |
26 | <h3 class="panel-title">${_('User: %s') % c.user.username}</h3> |
|
26 | <h3 class="panel-title">${_('User: %s') % c.user.username}</h3> | |
27 | </div> |
|
27 | </div> | |
28 | <div class="panel-body"> |
|
28 | <div class="panel-body"> | |
29 | ${base.dt_info_panel(elems)} |
|
29 | ${base.dt_info_panel(elems)} | |
30 | </div> |
|
30 | </div> | |
31 | </div> |
|
31 | </div> | |
32 |
|
32 | |||
33 | <div class="panel panel-default"> |
|
33 | <div class="panel panel-default"> | |
34 | <div class="panel-heading"> |
|
34 | <div class="panel-heading"> | |
35 | <h3 class="panel-title">${_('Force Password Reset')}</h3> |
|
35 | <h3 class="panel-title">${_('Force Password Reset')}</h3> | |
36 | </div> |
|
36 | </div> | |
37 | <div class="panel-body"> |
|
37 | <div class="panel-body"> | |
38 | ${h.secure_form(h.route_path('user_disable_force_password_reset', user_id=c.user.user_id), request=request)} |
|
38 | ${h.secure_form(h.route_path('user_disable_force_password_reset', user_id=c.user.user_id), request=request)} | |
39 | <div class="field"> |
|
39 | <div class="field"> | |
40 | <button class="btn btn-default" type="submit"> |
|
40 | <button class="btn btn-default" type="submit"> | |
41 | <i class="icon-unlock"></i> ${_('Disable forced password reset')} |
|
41 | <i class="icon-unlock"></i> ${_('Disable forced password reset')} | |
42 | </button> |
|
42 | </button> | |
43 | </div> |
|
43 | </div> | |
44 | <div class="field"> |
|
44 | <div class="field"> | |
45 | <span class="help-block"> |
|
45 | <span class="help-block"> | |
46 | ${_("Clear the forced password change flag.")} |
|
46 | ${_("Clear the forced password change flag.")} | |
47 | </span> |
|
47 | </span> | |
48 | </div> |
|
48 | </div> | |
49 | ${h.end_form()} |
|
49 | ${h.end_form()} | |
50 |
|
50 | |||
51 | ${h.secure_form(h.route_path('user_enable_force_password_reset', user_id=c.user.user_id), request=request)} |
|
51 | ${h.secure_form(h.route_path('user_enable_force_password_reset', user_id=c.user.user_id), request=request)} | |
52 | <div class="field"> |
|
52 | <div class="field"> | |
53 | <button class="btn btn-default" type="submit" onclick="return confirm('${_('Confirm to enable forced password change')}');"> |
|
53 | <button class="btn btn-default" type="submit" onclick="return confirm('${_('Confirm to enable forced password change')}');"> | |
54 | <i class="icon-lock"></i> ${_('Enable forced password reset')} |
|
54 | <i class="icon-lock"></i> ${_('Enable forced password reset')} | |
55 | </button> |
|
55 | </button> | |
56 | </div> |
|
56 | </div> | |
57 | <div class="field"> |
|
57 | <div class="field"> | |
58 | <span class="help-block"> |
|
58 | <span class="help-block"> | |
59 | ${_("When this is enabled user will have to change they password when they next use RhodeCode system. This will also forbid vcs operations until someone makes a password change in the web interface")} |
|
59 | ${_("When this is enabled user will have to change they password when they next use RhodeCode system. This will also forbid vcs operations until someone makes a password change in the web interface")} | |
60 | </span> |
|
60 | </span> | |
61 | </div> |
|
61 | </div> | |
62 | ${h.end_form()} |
|
62 | ${h.end_form()} | |
63 |
|
63 | |||
64 | </div> |
|
64 | </div> | |
65 | </div> |
|
65 | </div> | |
66 |
|
66 | |||
67 | <div class="panel panel-default"> |
|
67 | <div class="panel panel-default"> | |
68 | <div class="panel-heading"> |
|
68 | <div class="panel-heading"> | |
69 | <h3 class="panel-title">${_('Personal Repository Group')}</h3> |
|
69 | <h3 class="panel-title">${_('Personal Repository Group')}</h3> | |
70 | </div> |
|
70 | </div> | |
71 | <div class="panel-body"> |
|
71 | <div class="panel-body"> | |
72 | ${h.secure_form(h.route_path('user_create_personal_repo_group', user_id=c.user.user_id), request=request)} |
|
72 | ${h.secure_form(h.route_path('user_create_personal_repo_group', user_id=c.user.user_id), request=request)} | |
73 |
|
73 | |||
74 | %if c.personal_repo_group: |
|
74 | %if c.personal_repo_group: | |
75 | <div class="panel-body-title-text">${_('Users personal repository group')} : ${h.link_to(c.personal_repo_group.group_name, h.route_path('repo_group_home', repo_group_name=c.personal_repo_group.group_name))}</div> |
|
75 | <div class="panel-body-title-text">${_('Users personal repository group')} : ${h.link_to(c.personal_repo_group.group_name, h.route_path('repo_group_home', repo_group_name=c.personal_repo_group.group_name))}</div> | |
76 | %else: |
|
76 | %else: | |
77 | <div class="panel-body-title-text"> |
|
77 | <div class="panel-body-title-text"> | |
78 | ${_('This user currently does not have a personal repository group')} |
|
78 | ${_('This user currently does not have a personal repository group')} | |
79 | <br/> |
|
79 | <br/> | |
80 | ${_('New group will be created at: `/%(path)s`') % {'path': c.personal_repo_group_name}} |
|
80 | ${_('New group will be created at: `/%(path)s`') % {'path': c.personal_repo_group_name}} | |
81 | </div> |
|
81 | </div> | |
82 | %endif |
|
82 | %endif | |
83 | <button class="btn btn-default" type="submit" ${'disabled="disabled"' if c.personal_repo_group else ''}> |
|
83 | <button class="btn btn-default" type="submit" ${'disabled="disabled"' if c.personal_repo_group else ''}> | |
84 | <i class="icon-folder-close"></i> |
|
84 | <i class="icon-folder-close"></i> | |
85 | ${_('Create personal repository group')} |
|
85 | ${_('Create personal repository group')} | |
86 | </button> |
|
86 | </button> | |
87 | ${h.end_form()} |
|
87 | ${h.end_form()} | |
88 | </div> |
|
88 | </div> | |
89 | </div> |
|
89 | </div> | |
90 |
|
90 | |||
91 |
|
91 | |||
92 | <div class="panel panel-danger"> |
|
92 | <div class="panel panel-danger"> | |
93 | <div class="panel-heading"> |
|
93 | <div class="panel-heading"> | |
94 | <h3 class="panel-title">${_('Delete User')}</h3> |
|
94 | <h3 class="panel-title">${_('Delete User')}</h3> | |
95 | </div> |
|
95 | </div> | |
96 | <div class="panel-body"> |
|
96 | <div class="panel-body"> | |
97 | ${h.secure_form(h.route_path('user_delete', user_id=c.user.user_id), request=request)} |
|
97 | ${h.secure_form(h.route_path('user_delete', user_id=c.user.user_id), request=request)} | |
98 |
|
98 | |||
99 | <table class="display"> |
|
99 | <table class="display rctable"> | |
100 | <tr> |
|
100 | <tr> | |
101 | <td> |
|
101 | <td> | |
102 | ${_ungettext('This user owns %s repository.', 'This user owns %s repositories.', len(c.user.repositories)) % len(c.user.repositories)} |
|
102 | ${_ungettext('This user owns %s repository.', 'This user owns %s repositories.', len(c.user.repositories)) % len(c.user.repositories)} | |
103 | </td> |
|
103 | </td> | |
104 | <td> |
|
104 | <td> | |
105 | %if len(c.user.repositories) > 0: |
|
105 | <input type="radio" id="user_repos_1" name="user_repos" value="detach" checked="checked" ${'disabled=1' if len(c.user.repositories) == 0 else ''} /> <label for="user_repos_1">${_('Detach repositories')}</label> | |
106 | <input type="radio" id="user_repos_1" name="user_repos" value="detach" checked="checked"/> <label for="user_repos_1">${_('Detach repositories')}</label> |
|
|||
107 | %endif |
|
|||
108 | </td> |
|
106 | </td> | |
109 | <td> |
|
107 | <td> | |
110 | %if len(c.user.repositories) > 0: |
|
108 | <input type="radio" id="user_repos_2" name="user_repos" value="delete" ${'disabled=1' if len(c.user.repositories) == 0 else ''} /> <label for="user_repos_2">${_('Delete repositories')}</label> | |
111 | <input type="radio" id="user_repos_2" name="user_repos" value="delete" /> <label for="user_repos_2">${_('Delete repositories')}</label> |
|
|||
112 | %endif |
|
|||
113 | </td> |
|
109 | </td> | |
114 | </tr> |
|
110 | </tr> | |
115 |
|
111 | |||
116 | <tr> |
|
112 | <tr> | |
117 | <td> |
|
113 | <td> | |
118 | ${_ungettext('This user owns %s repository group.', 'This user owns %s repository groups.', len(c.user.repository_groups)) % len(c.user.repository_groups)} |
|
114 | ${_ungettext('This user owns %s repository group.', 'This user owns %s repository groups.', len(c.user.repository_groups)) % len(c.user.repository_groups)} | |
119 | </td> |
|
115 | </td> | |
120 | <td> |
|
116 | <td> | |
121 | %if len(c.user.repository_groups) > 0: |
|
117 | <input type="radio" id="user_repo_groups_1" name="user_repo_groups" value="detach" checked="checked" ${'disabled=1' if len(c.user.repository_groups) == 0 else ''} /> <label for="user_repo_groups_1">${_('Detach repository groups')}</label> | |
122 | <input type="radio" id="user_repo_groups_1" name="user_repo_groups" value="detach" checked="checked"/> <label for="user_repo_groups_1">${_('Detach repository groups')}</label> |
|
|||
123 | %endif |
|
|||
124 | </td> |
|
118 | </td> | |
125 | <td> |
|
119 | <td> | |
126 | %if len(c.user.repository_groups) > 0: |
|
120 | <input type="radio" id="user_repo_groups_2" name="user_repo_groups" value="delete" ${'disabled=1' if len(c.user.repository_groups) == 0 else ''}/> <label for="user_repo_groups_2">${_('Delete repositories')}</label> | |
127 | <input type="radio" id="user_repo_groups_2" name="user_repo_groups" value="delete" /> <label for="user_repo_groups_2">${_('Delete repositories')}</label> |
|
|||
128 | %endif |
|
|||
129 | </td> |
|
121 | </td> | |
130 | </tr> |
|
122 | </tr> | |
131 |
|
123 | |||
132 | <tr> |
|
124 | <tr> | |
133 | <td> |
|
125 | <td> | |
134 | ${_ungettext('This user owns %s user group.', 'This user owns %s user groups.', len(c.user.user_groups)) % len(c.user.user_groups)} |
|
126 | ${_ungettext('This user owns %s user group.', 'This user owns %s user groups.', len(c.user.user_groups)) % len(c.user.user_groups)} | |
135 | </td> |
|
127 | </td> | |
136 | <td> |
|
128 | <td> | |
137 | %if len(c.user.user_groups) > 0: |
|
129 | <input type="radio" id="user_user_groups_1" name="user_user_groups" value="detach" checked="checked" ${'disabled=1' if len(c.user.user_groups) == 0 else ''}/> <label for="user_user_groups_1">${_('Detach user groups')}</label> | |
138 | <input type="radio" id="user_user_groups_1" name="user_user_groups" value="detach" checked="checked"/> <label for="user_user_groups_1">${_('Detach user groups')}</label> |
|
|||
139 | %endif |
|
|||
140 | </td> |
|
130 | </td> | |
141 | <td> |
|
131 | <td> | |
142 | %if len(c.user.user_groups) > 0: |
|
132 | <input type="radio" id="user_user_groups_2" name="user_user_groups" value="delete" ${'disabled=1' if len(c.user.user_groups) == 0 else ''}/> <label for="user_user_groups_2">${_('Delete repositories')}</label> | |
143 | <input type="radio" id="user_user_groups_2" name="user_user_groups" value="delete" /> <label for="user_user_groups_2">${_('Delete repositories')}</label> |
|
|||
144 | %endif |
|
|||
145 | </td> |
|
133 | </td> | |
146 | </tr> |
|
134 | </tr> | |
147 | </table> |
|
135 | </table> | |
148 | <div style="margin: 0 0 20px 0" class="fake-space"></div> |
|
136 | <div style="margin: 0 0 20px 0" class="fake-space"></div> | |
|
137 | <div class="pull-left"> | |||
|
138 | % if len(c.user.repositories) > 0 or len(c.user.repository_groups) > 0 or len(c.user.user_groups) > 0: | |||
|
139 | % endif | |||
|
140 | ||||
|
141 | <span style="padding: 0 5px 0 0">${_('New owner for detached objects')}:</span> | |||
|
142 | <div class="pull-right">${base.gravatar_with_user(c.first_admin.email, 16)}</div> | |||
|
143 | </div> | |||
|
144 | <div style="clear: both"> | |||
|
145 | ||||
|
146 | <div> | |||
|
147 | <p class="help-block"> | |||
|
148 | ${_("When selecting the detach option, the depending objects owned by this user will be assigned to the above user.")} | |||
|
149 | <br/> | |||
|
150 | ${_("The delete option will delete the user and all his owned objects!")} | |||
|
151 | </p> | |||
|
152 | </div> | |||
|
153 | ||||
|
154 | % if c.can_delete_user_message: | |||
|
155 | <p class="pre-formatting">${c.can_delete_user_message}</p> | |||
|
156 | % endif | |||
|
157 | </div> | |||
|
158 | ||||
|
159 | <div style="margin: 0 0 20px 0" class="fake-space"></div> | |||
149 |
|
160 | |||
150 | <div class="field"> |
|
161 | <div class="field"> | |
151 | <button class="btn btn-small btn-danger" type="submit" |
|
162 | <button class="btn btn-small btn-danger" type="submit" | |
152 | onclick="return confirm('${_('Confirm to delete this user: %s') % c.user.username}');" |
|
163 | onclick="return confirm('${_('Confirm to delete this user: %s') % c.user.username}');" | |
153 | ${"disabled" if not c.can_delete_user else ""}> |
|
164 | ${"disabled" if not c.can_delete_user else ""}> | |
154 | ${_('Delete this user')} |
|
165 | ${_('Delete this user')} | |
155 | </button> |
|
166 | </button> | |
156 | </div> |
|
167 | </div> | |
157 | % if c.can_delete_user_message: |
|
|||
158 | <p class="help-block pre-formatting">${c.can_delete_user_message}</p> |
|
|||
159 | % endif |
|
|||
160 |
|
||||
161 | <div class="field"> |
|
|||
162 | <span class="help-block"> |
|
|||
163 | %if len(c.user.repositories) > 0 or len(c.user.repository_groups) > 0 or len(c.user.user_groups) > 0: |
|
|||
164 | <p class="help-block">${_("When selecting the detach option, the depending objects owned by this user will be assigned to the `%s` super admin in the system. The delete option will delete the user's repositories!") % (c.first_admin.full_name)}</p> |
|
|||
165 | %endif |
|
|||
166 | </span> |
|
|||
167 | </div> |
|
|||
168 |
|
168 | |||
169 | ${h.end_form()} |
|
169 | ${h.end_form()} | |
170 | </div> |
|
170 | </div> | |
171 | </div> |
|
171 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now