LP#1446860 - Correct mistaken logic in previous fix.
authorChris Sharp <csharp@georgialibraries.org>
Wed, 22 Apr 2015 13:54:11 +0000 (09:54 -0400)
committerBen Shum <bshum@biblio.org>
Thu, 11 Jun 2015 01:35:29 +0000 (21:35 -0400)
See https://bugs.launchpad.net/evergreen/+bug/1446860/comments/2
for reference.  The logic was not enforcing the "if the editing
staff member doesn't have permission to edit a user in this
permission group" check.  This corrects that.

Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/web/js/ui/default/actor/user/register.js

index e5846fc..2e6f2ad 100644 (file)
@@ -302,7 +302,7 @@ function load() {
 
        dojo.connect(setExpireDate, 'onClick', setExpireDateHandler);
 
-    if(!patron.isnew() && !checkGrpAppPerm(patron.profile()) && patron.id() == openils.User.user.id()) {
+    if(!patron.isnew() && !checkGrpAppPerm(patron.profile()) || patron.id() == openils.User.user.id()) {
         // we are not allowed to edit this user, so disable the save option
         saveButton.attr('disabled', true);
         saveCloneButton.attr('disabled', true);