[open-ils-commits] [GIT] Evergreen ILS branch master updated. f005b29cd1cc52175bbf06cb00e56b49e363eefa

Evergreen Git git at git.evergreen-ils.org
Wed Sep 7 14:25:17 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  f005b29cd1cc52175bbf06cb00e56b49e363eefa (commit)
       via  11bae0ebb53bf99959481d1604185df797dd11ba (commit)
      from  ba3920713df112f689ed91132a9dfeffd3033e60 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f005b29cd1cc52175bbf06cb00e56b49e363eefa
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Wed Sep 7 13:39:32 2011 -0400

    Remove "fallback to old style" UPDATE perm
    
    The middle layer no longer supports the
    UPDATE_ORG_UNIT_SETTING. + name
    form of editing permissions. Don't use it as a fallback.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js b/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js
index 72a8abb..31a6a4a 100644
--- a/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js
+++ b/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js
@@ -199,12 +199,12 @@ function osFormatEditLink(name) {
 function osLaunchEditor(name) {
     osEditDialog._osattr = name;
     osEditDialog.show();
-    var perm = 'UPDATE_ORG_UNIT_SETTING.' + name;
+    var perms = ['UPDATE_ORG_UNIT_SETTING_ALL'];
     if(osSettings[name].update_perm && perm_codes[osSettings[name].update_perm]) {
-        perm = perm_codes[osSettings[name].update_perm];
+        perms.push(perm_codes[osSettings[name].update_perm]);
     }
     user.buildPermOrgSelector(
-        [perm, 'UPDATE_ORG_UNIT_SETTING_ALL'],
+        perms,
         osEditContextSelector, osSettings[name].context
     );
     dojo.byId('os-edit-name').innerHTML = osSettings[name].label;

commit 11bae0ebb53bf99959481d1604185df797dd11ba
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Tue Aug 30 17:04:57 2011 -0400

    Library Settings Editor: Use real perms
    
    When update_perm exists use that permission, instead of a permission based
    solely on the name of the permission.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js b/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js
index 82f0475..72a8abb 100644
--- a/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js
+++ b/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js
@@ -22,6 +22,7 @@ var user;
 var osSettings = {};
 var ouSettingValues = {};
 var osEditAutoWidget;
+var perm_codes = {};
 
 function osInit(data) {
     authtoken = new openils.CGI().param('ses') || dojo.cookie('ses');
@@ -43,6 +44,20 @@ function osInit(data) {
     };
 
     new openils.User().buildPermOrgSelector('VIEW_ORG_SETTINGS', osContextSelector, null, connect);
+
+    fieldmapper.standardRequest(
+        [   'open-ils.actor',
+            'open-ils.actor.permissions.retrieve'],
+        {   async: true,
+            oncomplete: function(r) {
+                var data = r.recv().content();
+                if(e = openils.Event.parse(data))
+                    return alert(e);
+                for(var key in data)
+                    perm_codes[data[key].id()] = data[key].code();
+            }
+        }
+    );
 }
 dojo.addOnLoad(osInit);
 
@@ -65,7 +80,8 @@ function osDraw(specific_setting) {
                     label : type.label(),
                     desc : type.description(),
                     type : type.datatype(),
-                    fm_class : type.fm_class()
+                    fm_class : type.fm_class(),
+                    update_perm : type.update_perm()
                 }
             }
         );
@@ -183,8 +199,12 @@ function osFormatEditLink(name) {
 function osLaunchEditor(name) {
     osEditDialog._osattr = name;
     osEditDialog.show();
+    var perm = 'UPDATE_ORG_UNIT_SETTING.' + name;
+    if(osSettings[name].update_perm && perm_codes[osSettings[name].update_perm]) {
+        perm = perm_codes[osSettings[name].update_perm];
+    }
     user.buildPermOrgSelector(
-        ['UPDATE_ORG_UNIT_SETTING.' + name, 'UPDATE_ORG_UNIT_SETTING_ALL'],
+        [perm, 'UPDATE_ORG_UNIT_SETTING_ALL'],
         osEditContextSelector, osSettings[name].context
     );
     dojo.byId('os-edit-name').innerHTML = osSettings[name].label;

-----------------------------------------------------------------------

Summary of changes:
 .../staff_client/server/admin/org_unit_settings.js |   24 ++++++++++++++++++-
 1 files changed, 22 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list