##// 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 103 if obj.username == User.DEFAULT_USER:
104 104 return '#####'
105 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 114 def display_user_group_sort(obj):
@@ -33,6 +33,12 b' table.dataTable {'
33 33 .rc-user {
34 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 44 .td-email {
@@ -68,10 +68,15 b''
68 68 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
69 69 % endif
70 70 % else:
71 ${h.link_to_user(_user.username)}
72 %if getattr(_user, 'duplicate_perm', None):
73 (${_('inactive duplicate')})
74 %endif
71 % if getattr(_user, 'duplicate_perm', None):
72 <span class="user-perm-duplicate">
73 ${h.link_to_user(_user.username)}
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')})
75 </span>
76 </span>
77 % else:
78 ${h.link_to_user(_user.username)}
79 % endif
75 80 % endif
76 81 </span>
77 82 </td>
@@ -116,10 +121,15 b''
116 121 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
117 122 % endif
118 123 % else:
119 ${h.link_to_user(_user.username)}
120 %if getattr(_user, 'duplicate_perm', None):
121 (${_('inactive duplicate')})
122 %endif
124 % if getattr(_user, 'duplicate_perm', None):
125 <span class="user-perm-duplicate">
126 ${h.link_to_user(_user.username)}
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')})
128 </span>
129 </span>
130 % else:
131 ${h.link_to_user(_user.username)}
132 % endif
123 133 % endif
124 134 <span class="user-perm-help-text">(${_('delegated admin')})</span>
125 135 </span>
@@ -94,10 +94,16 b''
94 94 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
95 95 % endif
96 96 % else:
97 ${h.link_to_user(_user.username)}
98 %if getattr(_user, 'duplicate_perm', None):
99 (${_('inactive duplicate')})
100 %endif
97 % if getattr(_user, 'duplicate_perm', None):
98 <span class="user-perm-duplicate">
99 ${h.link_to_user(_user.username)}
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')})
101 </span>
102 </span>
103 % else:
104 ${h.link_to_user(_user.username)}
105 % endif
106
101 107 %if getattr(_user, 'branch_rules', None):
102 108 % if used_by_n_rules == 1:
103 109 (${_('used by {} branch rule, requires write+ permissions').format(used_by_n_rules)})
@@ -74,10 +74,15 b''
74 74 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
75 75 % endif
76 76 % else:
77 ${h.link_to_user(_user.username)}
78 %if getattr(_user, 'duplicate_perm', None):
79 (${_('inactive duplicate')})
80 %endif
77 % if getattr(_user, 'duplicate_perm', None):
78 <span class="user-perm-duplicate">
79 ${h.link_to_user(_user.username)}
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')})
81 </span>
82 </span>
83 % else:
84 ${h.link_to_user(_user.username)}
85 % endif
81 86 % endif
82 87 </span>
83 88 </td>
@@ -122,10 +127,15 b''
122 127 <span class="user-perm-help-text"> - ${_('permission for other logged in users')}</span>
123 128 % endif
124 129 % else:
125 ${h.link_to_user(_user.username)}
126 %if getattr(_user, 'duplicate_perm', None):
127 (${_('inactive duplicate')})
128 %endif
130 % if getattr(_user, 'duplicate_perm', None):
131 <span class="user-perm-duplicate">
132 ${h.link_to_user(_user.username)}
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')})
134 </span>
135 </span>
136 % else:
137 ${h.link_to_user(_user.username)}
138 % endif
129 139 % endif
130 140 <span class="user-perm-help-text">(${_('delegated admin')})</span>
131 141 </span>
General Comments 0
You need to be logged in to leave comments. Login now