koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/C4 Auth.pm [rel_2_2]


From: Ryan Higgins
Subject: [Koha-cvs] koha/C4 Auth.pm [rel_2_2]
Date: Fri, 04 May 2007 19:17:59 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_2_2
Changes by:     Ryan Higgins <rych>     07/05/04 19:17:59

Modified files:
        C4             : Auth.pm 

Log message:
        allow scripts to require multiple authflags.
        previously haspermission() returned true if user has _any_ 
        permission called for in flagsrequired.  now return false 
        unless user has all flagsrequired.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Auth.pm?cvsroot=koha&only_with_tag=rel_2_2&r1=1.36.2.23&r2=1.36.2.24

Patches:
Index: Auth.pm
===================================================================
RCS file: /sources/koha/koha/C4/Auth.pm,v
retrieving revision 1.36.2.23
retrieving revision 1.36.2.24
diff -u -b -r1.36.2.23 -r1.36.2.24
--- Auth.pm     6 Apr 2007 14:17:16 -0000       1.36.2.23
+++ Auth.pm     4 May 2007 19:17:59 -0000       1.36.2.24
@@ -212,9 +212,6 @@
                                OpacNav => C4::Context->preference("OpacNav"),
                                opacheader      => 
C4::Context->preference("opacheader"),
                                opaccredits => 
C4::Context->preference("opaccredits"),
-                               opacsmallimage => 
C4::Context->preference("opacsmallimage"),
-                               opaclayoutstylesheet => 
C4::Context->preference("opaclayoutstylesheet"),
-                               opaccolorstylesheet => 
C4::Context->preference("opaccolorstylesheet"),
                                opaclanguagesdisplay => 
C4::Context->preference("opaclanguagesdisplay"),
                                TemplateEncoding => 
C4::Context->preference("TemplateEncoding"),
                                opacuserlogin => 
C4::Context->preference("opacuserlogin"),
@@ -519,9 +516,6 @@
                                 OpacNav => C4::Context->preference("OpacNav"),
                                 opacheader      => 
C4::Context->preference("opacheader"),
                                 opaccredits => 
C4::Context->preference("opaccredits"),
-                                opacsmallimage => 
C4::Context->preference("opacsmallimage"),
-                                opaclayoutstylesheet => 
C4::Context->preference("opaclayoutstylesheet"),
-                                opaccolorstylesheet => 
C4::Context->preference("opaccolorstylesheet"),
                                 TemplateEncoding => 
C4::Context->preference("TemplateEncoding"),
                                 Demo => C4::Context->preference("Demo"),
                                 opacuserlogin => 
C4::Context->preference("opacuserlogin"),
@@ -614,9 +608,10 @@
     }
     return $flags if $flags->{superlibrarian};
     foreach (keys %$flagsrequired) {
-       return $flags if $flags->{$_};
+#              return $flags if $flags->{$_};
+               return 0 unless $flags->{$_};
     }
-    return 0;
+    return $flags;
 }
 
 sub getborrowernumber {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]