From 105adc6ccd40f5f03bcc29da652b56fca4fc4e41 Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Thu, 29 Nov 2007 17:43:03 -0600 Subject: [PATCH] changing haspermission() to require that user has ALL requiredflags, not ANYOF requiredflags Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Auth.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 5a4ff21e58..046f279632 100755 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1211,9 +1211,9 @@ sub haspermission { } return $flags if $flags->{superlibrarian}; foreach ( keys %$flagsrequired ) { - return $flags if $flags->{$_}; + return 0 unless( $flags->{$_} ); } - return 0; + return $flags; } sub getborrowernumber { -- 2.39.5