[Koha-cvs] CVS: koha/C4 Auth.pm,1.28,1.29

Paul POULAIN tipaul at users.sourceforge.net
Wed Aug 6 14:38:29 CEST 2003


Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv11231/C4

Modified Files:
	Auth.pm 
Log Message:
adding demo mode

Index: Auth.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Auth.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** Auth.pm	11 Jun 2003 18:40:53 -0000	1.28
--- Auth.pm	6 Aug 2003 12:38:27 -0000	1.29
***************
*** 46,50 ****
    my $query = new CGI;
  
!   my ($template, $borrowernumber, $cookie) 
      = get_template_and_user({template_name   => "opac-main.tmpl",
                               query           => $query,
--- 46,50 ----
    my $query = new CGI;
  
!   my ($template, $borrowernumber, $cookie)
      = get_template_and_user({template_name   => "opac-main.tmpl",
                               query           => $query,
***************
*** 368,371 ****
--- 368,376 ----
  		return 2;
  	}
+ 	if ($userid eq 'demo' && $password eq 'demo' && C4::Context->config('demo')) {
+ 		# DEMO => the demo user is allowed to do everything (if demo set to 1 in koha.conf
+ 		# some features won't be effective : modify systempref, modify MARC structure,
+ 		return 2;
+ 	}
  	return 0;
  }
***************
*** 400,403 ****
--- 405,412 ----
      if ($userid eq C4::Context->config('user')) {
  	# Super User Account from /etc/koha.conf
+ 	$flags->{'superlibrarian'}=1;
+     }
+     if ($userid eq 'demo' && C4::Context->config('demo')) {
+ 	# Demo user that can do "anything" (demo=1 in /etc/koha.conf)
  	$flags->{'superlibrarian'}=1;
      }





More information about the Koha-cvs mailing list