From 951b4a667dba9927bc452c043efeea5f9329f056 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 19 Jan 2011 22:28:02 +0000 Subject: [PATCH] if this user does not have permission to edit an existing user, disable the save and clone buttons git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@19224 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/ui/default/actor/user/register.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js index f06a9fe8d8..4ec64c2c93 100644 --- a/Open-ILS/web/js/ui/default/actor/user/register.js +++ b/Open-ILS/web/js/ui/default/actor/user/register.js @@ -147,6 +147,13 @@ function load() { } else { 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); + } + } var permGroups; -- 2.11.0