Closed Bug 201018 Opened 21 years ago Closed 21 years ago

editusers.cgi never calls DeriveGroup prior to changing a bug

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

2.17.3
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: justdave, Assigned: justdave)

References

Details

(Whiteboard: [fixed in 2.17.4])

Attachments

(1 file, 2 obsolete files)

This means if you edit a user's groups, and they have privileges which are
inherited from a group you changed, those privilege changes aren't taken into
account.

I fixed this on Zippy's install by calling DeriveGroup from editusers after
changing the user's groups.  Patch coming
Attached patch Patch v1 (obsolete) — Splinter Review
Attachment #119673 - Flags: review?(myk)
This shouldn't be needed. Bugzilla::login calls |&::ConfirmGroup($userid);| in
CVS, and this was in the old login code too.
How does it know it needs to update though?

changing a user's groups doesn't change the timestamps on the groups...

the only way to make ConfirmGroups work in that case is to set the
refreshed_when on the user to Some Date In The Far Past...
Comment on attachment 119673 [details] [diff] [review]
Patch v1

Thats not good enough, because you could be changing the login_name too, which
affects regexps.

Also, given the lack of transaction safety, to be really safe you should start
off by setting refreshed_when to <some date in the past>, then rederive at the
end (just do it unconditionally, I think, althogh you can have a flag for
email+grop changes only, I guess). That protects against server failure in the
middle.
Attachment #119673 - Flags: review?(myk) → review-
Attached patch Patch v2 (obsolete) — Splinter Review
Attachment #119673 - Attachment is obsolete: true
Attachment #119674 - Flags: review?(bbaetz)
Comment on attachment 119674 [details] [diff] [review]
Patch v2

OK, this works.

Do we need a checksetup fix for this? We should add one, unconditionally for
now, but then conditional on the next schema change when we have one.
Attachment #119674 - Flags: review?(bbaetz) → review+
probably wouldn't hurt.

UPDATE profiles SET refreshed_when='1900-01-01 00:00:00'

would probably do the trick.
Can we get this in now, or is this going to wait for the release? It doesn't
affect 2.16. Theres a schema patch (bug 180086) which shoudl go in in the next
few days, and we can put it in with that.

If you want this to wait, though, then we'll have issues with people who upgrade
to that before the release, and we'll have to make it unconditional until the
change after that.
Target Milestone: --- → Bugzilla 2.18
I'm waiting on bug 180086 for a reply to a mail I sent to developers@ about
checma change locations. In teh meantime, we can put this in to always run the
refersh, although that schema change also depends on the answer to my message...

http://bugzilla.org/cgi-bin/mj_wwwusr?func=archive-index-date&list=developers&extra=200304

is the post.
Summary: process_bug.cgi never calls DeriveGroup prior to changing a bug → editusers.cgi never calls DeriveGroup prior to changing a bug
Blocks: 190911
Depends on: 180086
Blocks: 180086
No longer depends on: 180086
Flags: approval?
No longer blocks: 190911
Whiteboard: [wanted for 2.17.5]
Just the schema change; no other changes from the previous patch.
Attachment #119674 - Attachment is obsolete: true
Attachment #121585 - Flags: review+
Comment on attachment 121585 [details] [diff] [review]
adds schema change too

r=myk; works for me too
Flags: approval? → approval+
Whiteboard: [wanted for 2.17.5] → [wanted for 2.17.4]
Fixed for 2.17.4:

Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.229; previous revision: 1.228
done
Checking in editusers.cgi;
/cvsroot/mozilla/webtools/bugzilla/editusers.cgi,v  <--  editusers.cgi
new revision: 1.43; previous revision: 1.42
done
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Whiteboard: [wanted for 2.17.4] → [fixed in 2.17.4]
Security Advisory has been posted, removing security group
Group: webtools-security
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: