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:27:14 +0000 (22:27 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 19 Jan 2011 22:27:14 +0000 (22:27 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19222 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index fd05db7..472fec8 100644 (file)
@@ -148,6 +148,13 @@ function load() {
         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);
+    }
+        
     lock_ready = true;
 }