Closed
Bug 312437
Opened 19 years ago
Closed 19 years ago
Do not display the "Impersonate this user" link when the user is in the bz_sudo_protect group
Categories
(Bugzilla :: User Interface, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.22
People
(Reporter: LpSolit, Assigned: karl)
Details
Attachments
(1 file, 1 obsolete file)
1.13 KB,
patch
|
jouni
:
review+
|
Details | Diff | Splinter Review |
We actually need several steps before getting an error message telling us that the user we try to impersonate is in the bz_sudo_protect group. admin/users/userdata.html.tmpl, line 34 should take care of that: <a href="relogin.cgi?action=sudo&target_login= [%- otheruser.login FILTER html %]">Impersonate this user</a> It should be displayed only when [% otheruser.groups.bz_sudo_protect %] is false. Note that 'usevisibilitygroups' doesn't need to be checked here as only users with editusers privs can see this link; and these users can bypass this visibility restriction anyway.
Reporter | ||
Updated•19 years ago
|
Target Milestone: --- → Bugzilla 2.22
Reporter | ||
Updated•19 years ago
|
Summary: Do not display the "Impersonate this user" when the user is in the bz_sudo_protect group → Do not display the "Impersonate this user" link when the user is in the bz_sudo_protect group
Assignee | ||
Comment 1•19 years ago
|
||
A relatively simple change. Since the template gets an object corresponding to the user who we wish to edit, it's easy enough to see if the user is in the bz_sudo_protect group, and then only display the link if they are not. Requesting review from jouni.
Reporter | ||
Comment 2•19 years ago
|
||
Comment on attachment 199565 [details] [diff] [review] Patch v1 >+ [% IF !otheruser.in_group("bz_sudo_protect") %] For consistency among templates, could we use otheruser.groups.bz_sudo_protect? .in_group() is used nowhere else in templates.
Assignee | ||
Updated•19 years ago
|
Attachment #199565 -
Flags: review?(jouni)
Assignee | ||
Comment 3•19 years ago
|
||
Modification of attachment 199565 [details] [diff] [review] with respect to comment 2: > For consistency among templates, could we use otheruser.groups.bz_sudo_protect? > .in_group() is used nowhere else in templates. OK.
Attachment #199565 -
Attachment is obsolete: true
Attachment #199631 -
Flags: review?(jouni)
Comment 4•19 years ago
|
||
Comment on attachment 199631 [details] [diff] [review] Patch v1.1 >+ <a href="relogin.cgi?action=sudo&target_login= >+ [%- otheruser.login FILTER html %]">Impersonate this user</a> >+ [% END %] r=jouni, but turn the & into an & prior to checkin (yes I know you didn't cause it).
Attachment #199631 -
Flags: review?(jouni) → review+
Assignee | ||
Updated•19 years ago
|
Flags: approval?
Updated•19 years ago
|
Flags: approval? → approval+
Reporter | ||
Comment 5•19 years ago
|
||
Checking in template/en/default/admin/users/userdata.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/admin/users/userdata.html.tmpl,v <-- userdata.html.tmpl new revision: 1.3; previous revision: 1.2 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•