Closed
Bug 305476
Opened 19 years ago
Closed 19 years ago
Group membership inheritance broken in editusers.cgi
Categories
(Bugzilla :: Administration, task, P2)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.22
People
(Reporter: Wurblzap, Assigned: bugreport)
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
|
1.62 KB,
patch
|
Wurblzap
:
review+
|
Details | Diff | Splinter Review |
This is a regression of bug 304583. 1. Log in as a member of the admin group 2. Create a new group (automatically getting admin inheritance) with no regexp 3. Using editusers.cgi, show all members of the new group 4. Wonder why there are no users shown, particularly not your own user The reason is that selection by group relies on user_group_map entries for derived group membership, which don't exist any more. Continued: 5. Show your user in editusers.cgi 6. Wonder why there is no mark-up for inherited membership to the new group The reason is that userDataToVars doesn't retrieve "derivedmember" information any more.
| Reporter | ||
Updated•19 years ago
|
Target Milestone: --- → Bugzilla 2.22
| Assignee | ||
Comment 1•19 years ago
|
||
I'll investigate this today.
Assignee: administration → bugreport
Priority: -- → P2
| Assignee | ||
Comment 2•19 years ago
|
||
I hate these queries that populate hash members based on the field names in the SQL. There were 2 problems here... both fixed. 1) userDataToVars() uses field names as hash member names. 2) the selection by group id needed to flatten the desired group first.
Attachment #193440 -
Flags: review?
| Reporter | ||
Comment 3•19 years ago
|
||
Comment on attachment 193440 [details] [diff] [review] Fixed in both places >@@ -656,7 +655,8 @@ > qq{SELECT id, > COUNT(directmember.group_id) AS directmember, > COUNT(regexpmember.group_id) AS regexpmember, >- CASE WHEN groups.id IN ($grouplist) THEN 1 ELSE 0 END, >+ (CASE WHEN groups.id IN ($grouplist) THEN 1 ELSE 0 END) >+ AS derivedmember, > COUNT(directbless.group_id) AS directbless > FROM groups > LEFT JOIN user_group_map AS directmember This returns "1" too often; the derivedmember column should be 1 if membership is because of inheritance only, and this returns "1" for every group the user account is a member of, directly or indirectly. This could be solved at template level if it's not feasible to do it here.
Attachment #193440 -
Flags: review? → review-
| Assignee | ||
Comment 4•19 years ago
|
||
Attachment #193440 -
Attachment is obsolete: true
Attachment #193444 -
Flags: review?(wurblzap)
| Reporter | ||
Updated•19 years ago
|
Attachment #193444 -
Flags: review?(wurblzap) → review+
| Reporter | ||
Updated•19 years ago
|
Flags: approval?
Updated•19 years ago
|
Flags: approval? → approval+
Comment 5•19 years ago
|
||
Checking in editusers.cgi; /cvsroot/mozilla/webtools/bugzilla/editusers.cgi,v <-- editusers.cgi new revision: 1.99; previous revision: 1.98 done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•