From: erickson Date: Wed, 19 Jan 2011 22:28:02 +0000 (+0000) Subject: if this user does not have permission to edit an existing user, disable the save... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=951b4a667dba9927bc452c043efeea5f9329f056;p=contrib%2FConifer.git 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 --- 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;