(sitka) rt15308 OFFLINE_CREATE_SESSION perm added user/lwhalen/rt15308
authorLiam Whalen <liam.whalen@bc.libraries.coop>
Tue, 22 Oct 2013 21:32:46 +0000 (14:32 -0700)
committerLiam Whalen <liam.whalen@bc.libraries.coop>
Thu, 24 Oct 2013 17:43:24 +0000 (10:43 -0700)
Currenlty, a user needs to have the OFFLINE_EXECUTE perm to create an
offline session.  However, this does not provide enough granularity for
some of the libraries.  So, this new perm (OFFLINE_CREATE_SESSION)
allows libraries to give specifc users the ability to create offline
sessions.

Signed-off-by: Liam Whalen <liam.whalen@bc.libraries.coop>
Open-ILS/src/offline/offline.pl
Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.js

index 6c04fca..3806452 100755 (executable)
@@ -115,7 +115,7 @@ sub ol_do_action {
 
        if( $action eq 'create' ) {
                
-               $evt = $U->check_perms($requestor->id, $org, 'OFFLINE_EXECUTE');
+               $evt = $U->check_perms($requestor->id, $org, 'OFFLINE_CREATE_SESSION');
                ol_handle_result($evt) if $evt;
                $payload = ol_create_session();
 
index 9a89a94..625840a 100644 (file)
@@ -27,7 +27,7 @@ admin.offline_manage_xacts.prototype = {
         obj.retrieve_seslist(); obj.render_seslist();
 
         var x = document.getElementById('create');
-        if (obj.check_perm(['OFFLINE_EXECUTE'])) {
+        if (obj.check_perm(['OFFLINE_CREATE_SESSION'])) {
             x.disabled = false;
             x.addEventListener('command',function() { try{obj.create_ses();}catch(E){alert(E);} },false);
         }