[Koha-cvs] CVS: koha/C4 Auth_with_ldap.pm,1.1,1.2

doXulting doxulting at users.sourceforge.net
Wed Mar 23 10:25:52 CET 2005


Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11463/C4

Modified Files:
	Auth_with_ldap.pm 
Log Message:
New param for the template in order to show only allowed links to user (In parameters screen only right now)

Index: Auth_with_ldap.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Auth_with_ldap.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** Auth_with_ldap.pm	5 Nov 2004 10:13:31 -0000	1.1
--- Auth_with_ldap.pm	23 Mar 2005 09:25:50 -0000	1.2
***************
*** 133,141 ****
  
  		$borrowernumber = getborrowernumber($user);
! 		my ($borr, $flags) = getpatroninformation(undef, $borrowernumber);
  		my @bordat;
  		$bordat[0] = $borr;
  		$template->param(USER_INFO => \@bordat,
  		);
  	}
  	$template->param(
--- 133,203 ----
  
  		$borrowernumber = getborrowernumber($user);
! 		my ($borr, $alternativeflags) = getpatroninformation(undef, $borrowernumber);
  		my @bordat;
  		$bordat[0] = $borr;
  		$template->param(USER_INFO => \@bordat,
  		);
+ 		
+ 		# We are going to use the $flags returned by checkauth
+ 		# to create the template's parameters that will indicate
+ 		# which menus the user can access.
+ 		if ($flags->{superlibrarian} == 1)
+ 		{
+ 			$template->param(CAN_user_circulate => 1);
+ 			$template->param(CAN_user_catalogue => 1);
+ 			$template->param(CAN_user_parameters => 1);
+ 			$template->param(CAN_user_borrowers => 1);
+ 			$template->param(CAN_user_permission => 1);
+ 			$template->param(CAN_user_reserveforothers => 1);
+ 			$template->param(CAN_user_borrow => 1);
+ 			$template->param(CAN_user_reserveforself => 1);
+ 			$template->param(CAN_user_editcatalogue => 1);
+ 			$template->param(CAN_user_updatecharge => 1);
+ 			$template->param(CAN_user_acquisition => 1);
+ 			$template->param(CAN_user_management => 1);
+ 			$template->param(CAN_user_tools => 1); }
+ 		
+ 		if ($flags->{circulate} == 1) {
+ 			$template->param(CAN_user_circulate => 1); }
+ 
+ 		if ($flags->{catalogue} == 1) {
+ 			$template->param(CAN_user_catalogue => 1); }
+ 		

+ 		if ($flags->{parameters} == 1) {
+ 			$template->param(CAN_user_parameters => 1);	
+ 			$template->param(CAN_user_management => 1);
+ 			$template->param(CAN_user_tools => 1); }
+ 		

+ 		if ($flags->{borrowers} == 1) {
+ 			$template->param(CAN_user_borrowers => 1); }
+ 		

+ 		if ($flags->{permissions} == 1) {
+ 			$template->param(CAN_user_permission => 1); }
+ 		
+ 		if ($flags->{reserveforothers} == 1) {
+ 			$template->param(CAN_user_reserveforothers => 1); }
+ 		

+ 		if ($flags->{borrow} == 1) {
+ 			$template->param(CAN_user_borrow => 1); }
+ 		

+ 		if ($flags->{reserveforself} == 1) {
+ 			$template->param(CAN_user_reserveforself => 1); }
+ 		

+ 		if ($flags->{editcatalogue} == 1) {
+ 			$template->param(CAN_user_editcatalogue => 1); }
+ 		

+ 		if ($flags->{updatecharges} == 1) {
+ 			$template->param(CAN_user_updatecharge => 1); }
+ 		
+ 		if ($flags->{acquisition} == 1) {
+ 			$template->param(CAN_user_acquisition => 1); }
+ 		
+ 		if ($flags->{management} == 1) {
+ 			$template->param(CAN_user_management => 1);
+ 			$template->param(CAN_user_tools => 1); }
+ 		
+ 		if ($flags->{tools} == 1) {
+ 			$template->param(CAN_user_tools => 1); }
+ 		
  	}
  	$template->param(





More information about the Koha-cvs mailing list