##// END OF EJS Templates
permissions: explain better what is inactive duplicate in permissions, sort them to last positions, and make them less visible.
dan -
r4417:524f9e6a default
parent child Browse files
Show More
@@ -103,7 +103,12 b' def display_user_sort(obj):'
103 if obj.username == User.DEFAULT_USER:
103 if obj.username == User.DEFAULT_USER:
104 return '#####'
104 return '#####'
105 prefix = PERMISSION_TYPE_SORT.get(obj.permission.split('.')[-1], '')
105 prefix = PERMISSION_TYPE_SORT.get(obj.permission.split('.')[-1], '')
106 return prefix + obj.username
106 extra_sort_num = '1' # default
107
108 # NOTE(dan): inactive duplicates goes last
109 if getattr(obj, 'duplicate_perm', None):
110 extra_sort_num = '9'
111 return prefix + extra_sort_num + obj.username
107
112
108
113
109 def display_user_group_sort(obj):
114 def display_user_group_sort(obj):
@@ -33,6 +33,12 b' table.dataTable {'
33 .rc-user {
33 .rc-user {
34 white-space: nowrap;
34 white-space: nowrap;
35 }
35 }
36 .user-perm-duplicate {
37 color: @grey4;
38 a {
39 color: @grey4;
40 }
41 }
36 }
42 }
37
43
38 .td-email {
44 .td-email {
@@ -68,9 +68,14 b''
68 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
68 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
69 % endif
69 % endif
70 % else:
70 % else:
71 % if getattr(_user, 'duplicate_perm', None):
72 <span class="user-perm-duplicate">
71 ${h.link_to_user(_user.username)}
73 ${h.link_to_user(_user.username)}
72 %if getattr(_user, 'duplicate_perm', None):
74 <span class="tooltip" title="${_('This entry is a duplicate, most probably left-over from previously set permission. This user has a higher permission set, so this entry is inactive. Please revoke this permission manually.')}">(${_('inactive duplicate')})
73 (${_('inactive duplicate')})
75 </span>
76 </span>
77 % else:
78 ${h.link_to_user(_user.username)}
74 %endif
79 % endif
75 % endif
80 % endif
76 </span>
81 </span>
@@ -116,9 +121,14 b''
116 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
121 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
117 % endif
122 % endif
118 % else:
123 % else:
124 % if getattr(_user, 'duplicate_perm', None):
125 <span class="user-perm-duplicate">
119 ${h.link_to_user(_user.username)}
126 ${h.link_to_user(_user.username)}
120 %if getattr(_user, 'duplicate_perm', None):
127 <span class="tooltip" title="${_('This entry is a duplicate, most probably left-over from previously set permission. This user has a higher permission set, so this entry is inactive. Please revoke this permission manually.')}">(${_('inactive duplicate')})
121 (${_('inactive duplicate')})
128 </span>
129 </span>
130 % else:
131 ${h.link_to_user(_user.username)}
122 %endif
132 % endif
123 % endif
133 % endif
124 <span class="user-perm-help-text">(${_('delegated admin')})</span>
134 <span class="user-perm-help-text">(${_('delegated admin')})</span>
@@ -94,10 +94,16 b''
94 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
94 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
95 % endif
95 % endif
96 % else:
96 % else:
97 % if getattr(_user, 'duplicate_perm', None):
98 <span class="user-perm-duplicate">
97 ${h.link_to_user(_user.username)}
99 ${h.link_to_user(_user.username)}
98 %if getattr(_user, 'duplicate_perm', None):
100 <span class="tooltip" title="${_('This entry is a duplicate, most probably left-over from previously set permission. This user has a higher permission set, so this entry is inactive. Please revoke this permission manually.')}">(${_('inactive duplicate')})
99 (${_('inactive duplicate')})
101 </span>
102 </span>
103 % else:
104 ${h.link_to_user(_user.username)}
100 %endif
105 % endif
106
101 %if getattr(_user, 'branch_rules', None):
107 %if getattr(_user, 'branch_rules', None):
102 % if used_by_n_rules == 1:
108 % if used_by_n_rules == 1:
103 (${_('used by {} branch rule, requires write+ permissions').format(used_by_n_rules)})
109 (${_('used by {} branch rule, requires write+ permissions').format(used_by_n_rules)})
@@ -74,9 +74,14 b''
74 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
74 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
75 % endif
75 % endif
76 % else:
76 % else:
77 % if getattr(_user, 'duplicate_perm', None):
78 <span class="user-perm-duplicate">
77 ${h.link_to_user(_user.username)}
79 ${h.link_to_user(_user.username)}
78 %if getattr(_user, 'duplicate_perm', None):
80 <span class="tooltip" title="${_('This entry is a duplicate, most probably left-over from previously set permission. This user has a higher permission set, so this entry is inactive. Please revoke this permission manually.')}">(${_('inactive duplicate')})
79 (${_('inactive duplicate')})
81 </span>
82 </span>
83 % else:
84 ${h.link_to_user(_user.username)}
80 %endif
85 % endif
81 % endif
86 % endif
82 </span>
87 </span>
@@ -122,9 +127,14 b''
122 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
127 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
123 % endif
128 % endif
124 % else:
129 % else:
130 % if getattr(_user, 'duplicate_perm', None):
131 <span class="user-perm-duplicate">
125 ${h.link_to_user(_user.username)}
132 ${h.link_to_user(_user.username)}
126 %if getattr(_user, 'duplicate_perm', None):
133 <span class="tooltip" title="${_('This entry is a duplicate, most probably left-over from previously set permission. This user has a higher permission set, so this entry is inactive. Please revoke this permission manually.')}">(${_('inactive duplicate')})
127 (${_('inactive duplicate')})
134 </span>
135 </span>
136 % else:
137 ${h.link_to_user(_user.username)}
128 %endif
138 % endif
129 % endif
139 % endif
130 <span class="user-perm-help-text">(${_('delegated admin')})</span>
140 <span class="user-perm-help-text">(${_('delegated admin')})</span>
General Comments 0
You need to be logged in to leave comments. Login now