[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 075be204b7698a0351fcd60a77a9d456d497e109
Evergreen Git
git at git.evergreen-ils.org
Wed Sep 7 14:26:44 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, rel_2_1 has been updated
via 075be204b7698a0351fcd60a77a9d456d497e109 (commit)
via 4e3b414681bc3e40194c4653b35bd17d9649b16d (commit)
from ee6a8b602cf59f548f536ae42ce21f6eb2827f8c (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 075be204b7698a0351fcd60a77a9d456d497e109
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 4e3b414681bc3e40194c4653b35bd17d9649b16d
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