From 80bfb3af26d11638b3719138a4ec0bcbf221309f Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 8 Sep 2006 15:34:55 +0000 Subject: [PATCH] people with patron update perms can now update their own account provided they do not change their profile - unless they have permission to change their profile... git-svn-id: svn://svn.open-ils.org/ILS/trunk@6029 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Actor.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index 8afd2505e4..96c04fcb14 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -348,6 +348,15 @@ sub check_group_perm { if( ! $patron->isnew ) { my $p = $session->request( 'open-ils.storage.direct.actor.user.retrieve', $patron->id )->gather(1); + + # If we are the requestor (trying to update our own account) + # and we are not trying to change our profile, we're good + if( $p->id == $requestor->id and + $p->profile == $patron->profile ) { + return undef; + } + + $evt = group_perm_failed($session, $requestor, $p); return $evt if $evt; } -- 2.43.2