From: erickson Date: Tue, 3 Jun 2008 03:32:19 +0000 (+0000) Subject: adding is_true wrapper on super_user test. toggled boolean test to allow superuser... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ff2cb9f144856f192c6b64b0cf3e34d27d5f29a3;p=Evergreen.git adding is_true wrapper on super_user test. toggled boolean test to allow superuser to edit perms git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2_2@9758 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index f491c9c1bf..f1f65fd0fe 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -842,7 +842,7 @@ sub set_user_perms { my $perms = $session->request('open-ils.storage.permission.user_perms.atomic', $user_obj->id)->gather(1); my $all = undef; - $all = 1 if ($user_obj->super_user()); + $all = 1 if ($U->is_true($user_obj->super_user())); $all = 1 unless ($U->check_perms($user_obj->id, $user_obj->home_ou, 'EVERYTHING')); for my $map (@$maps) { @@ -855,7 +855,7 @@ sub set_user_perms { $map->clear_id; } - next if (!$all || !grep { $_->perm eq $map->perm and $_->grantable == 1 and $_->depth <= $map->depth } @$perms); + next if (!$all and !grep { $_->perm eq $map->perm and $_->grantable == 1 and $_->depth <= $map->depth } @$perms); #warn( "Updating permissions with method $method and session $ses and map $map" ); $logger->info( "Updating permissions with method $method and map $map" );