changing haspermission() to require that user has ALL requiredflags, not ANYOF requir...
authorRyan Higgins <rch@liblime.com>
Thu, 29 Nov 2007 23:43:03 +0000 (17:43 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Sun, 2 Dec 2007 20:57:12 +0000 (14:57 -0600)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Auth.pm

index 5a4ff21..046f279 100755 (executable)
@@ -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 {