Comment 2 for bug 1446860

Revision history for this message
Thomas Berezansky (tsbere) wrote :

I don't think the new code is actually improving things. It changes the check from:

The patron is not a new patron, the editor can't edit the patron's group, and the editor is not the patron being edited

to:

The patron is not a new patron, the editor can't edit the patron's group, and the editor is the patron being edited

The end result basically means "never disable the save button unless you are editing yourself".

For what the proposed "intent" is (and I am not sure about that right now) I think the code would need to look like this:

if((!patron.isnew() && !checkGrpAppPerm(patron.profile())) || patron.id() == openils.User.user.id()) {

Which becomes:

The patron is not a new patron, the editor can't edit the patron's group, OR the editor is the patron being edited regardless of the previous two.