if this user does not have permission to edit an existing user, disable the save...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 19 Jan 2011 22:28:02 +0000 (22:28 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 19 Jan 2011 22:28:02 +0000 (22:28 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@19224 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/ui/default/actor/user/register.js

index f06a9fe..4ec64c2 100644 (file)
@@ -147,6 +147,13 @@ function load() {
     } else {
         input.widget.attr('disabled', true).attr('readOnly', true);
     }
+
+    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);
+    }
+        
 }
 
 var permGroups;