From 0fba817559c1c97f965b91d374e5aaea4de6aa35 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 19 Jan 2011 22:27:14 +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/trunk@19222 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 fd05db79ea..472fec8dbd 100644 --- a/Open-ILS/web/js/ui/default/actor/user/register.js +++ b/Open-ILS/web/js/ui/default/actor/user/register.js @@ -148,6 +148,13 @@ function load() { 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); + } + lock_ready = true; } -- 2.43.2