added permission to bar/unbar users disabled checkbox if permission is not there
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 29 Jul 2006 21:23:57 +0000 (21:23 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 29 Jul 2006 21:23:57 +0000 (21:23 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5168 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/ue.js
Open-ILS/xul/staff_client/server/patron/ue_config.js

index cf815f0..98fb299 100644 (file)
@@ -67,7 +67,7 @@ function uEditFetchNetLevels() {
 
 /* fetches necessary and builds the UI */
 function uEditBuild() {
-       //fetchHighestPermOrgs( SESSION, USER.id(), myPerms );
+       fetchHighestPermOrgs( SESSION, USER.id(), myPerms );
 
        uEditBuildLibSelector();
        patron = fetchFleshedUser(cgi.param('usr'));
@@ -94,6 +94,9 @@ function uEditBuild() {
                unHideMe($('ue_mark_card_lost'));
                unHideMe($('ue_reset_pw'));
        }
+
+       if(PERMS['BAR_PATRON'] == -1) 
+               $('ue_barred').disabled = true;
 }
 
 
index aab96ed..6cfe559 100644 (file)
@@ -20,7 +20,14 @@ const ADULT_AGE                      = 18;
 const GUARDIAN_NOTE            = 'SYSTEM: Parent/Guardian';
 
 /* if they don't have these perms, they shouldn't be here */
-var myPerms = [ 'CREATE_USER', 'UPDATE_USER', 'CREATE_PATRON_STAT_CAT_ENTRY_MAP' ];
+var myPerms = [ 
+       /*
+       'CREATE_USER', 
+       'UPDATE_USER', 
+       'CREATE_PATRON_STAT_CAT_ENTRY_MAP',
+       */
+       'BAR_PATRON',
+       ];
 
 var dataFields;
 const numRegex         = /^\d+$/;