Changeset 11937 for trunk/gsdl/cgi-bin/gliserver.pl
- Timestamp:
- 2006-06-19T17:06:58+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/cgi-bin/gliserver.pl
r11936 r11937 99 99 my $gsdl_cgi = shift(@_); 100 100 my $username = shift(@_); 101 my $ user_group_required= shift(@_);101 my $collection = shift(@_); 102 102 103 103 # Even if we're not authenticating remove the un and pw arguments, since these can mess up other scripts … … 146 146 my ($user_groups) = ($user_data =~ /\<groups\>(.*)/); 147 147 foreach my $user_group (split(/\,/, $user_groups)) { 148 if ($ user_group eq $user_group_required|| $user_group eq "remote-superuser") {148 if ($collection eq "" || $user_group eq "$collection-maintainer" || $user_group eq "remote-superuser") { 149 149 # Authentication successful! 150 150 return; … … 226 226 } 227 227 228 # Users must be in the <collection>-maintainer group to perform this action229 &authenticate_user($gsdl_cgi, $username, "$collection-maintainer");228 # Ensure the user is allowed to edit this collection 229 &authenticate_user($gsdl_cgi, $username, $collection); 230 230 231 231 my $gsdlhome = $ENV{'GSDLHOME'}; … … 272 272 } 273 273 274 # Users must be in the <collection>-maintainer group to perform this action275 &authenticate_user($gsdl_cgi, $username, "$collection-maintainer");274 # Ensure the user is allowed to edit this collection 275 &authenticate_user($gsdl_cgi, $username, $collection); 276 276 277 277 my $gsdlhome = $ENV{'GSDLHOME'}; … … 306 306 } 307 307 308 # Users must be in the <collection>-maintainer group to perform this action309 &authenticate_user($gsdl_cgi, $username, "$collection-maintainer");308 # Ensure the user is allowed to edit this collection 309 &authenticate_user($gsdl_cgi, $username, $collection); 310 310 311 311 my $gsdlhome = $ENV{'GSDLHOME'}; … … 353 353 } 354 354 355 # Users must be in the <collection>-maintainer group to perform this action356 &authenticate_user($gsdl_cgi, $username, "$collection-maintainer");355 # Ensure the user is allowed to edit this collection 356 &authenticate_user($gsdl_cgi, $username, $collection); 357 357 358 358 my $gsdlhome = $ENV{'GSDLHOME'}; … … 396 396 my ($gsdl_cgi, $username) = @_; 397 397 398 # Users must be in the remote-collection-buildergroup to perform this action399 &authenticate_user($gsdl_cgi, $username, " remote-collection-builder");398 # Users can be in any group to perform this action 399 &authenticate_user($gsdl_cgi, $username, ""); 400 400 401 401 my $gsdlhome = $ENV{'GSDLHOME'}; … … 445 445 } 446 446 447 # Users must be in the <collection>-maintainer group to perform this action448 &authenticate_user($gsdl_cgi, $username, "$collection-maintainer");447 # Ensure the user is allowed to edit this collection 448 &authenticate_user($gsdl_cgi, $username, $collection); 449 449 450 450 my $gsdlhome = $ENV{'GSDLHOME'}; … … 494 494 $gsdl_cgi->delete("script"); 495 495 496 # Users must be in the remote-collection-buildergroup to perform this action497 &authenticate_user($gsdl_cgi, $username, " remote-collection-builder");496 # Users can be in any group to perform this action 497 &authenticate_user($gsdl_cgi, $username, ""); 498 498 499 499 my $perl_args = ""; … … 553 553 } 554 554 555 # Users must be in the <collection>-maintainer group to perform this action556 &authenticate_user($gsdl_cgi, $username, "$collection-maintainer");555 # Ensure the user is allowed to edit this collection 556 &authenticate_user($gsdl_cgi, $username, $collection); 557 557 558 558 my $gsdlhome = $ENV{'GSDLHOME'}; … … 598 598 } 599 599 600 # Users must be in the <collection>-maintainer group to perform this action601 &authenticate_user($gsdl_cgi, $username, "$collection-maintainer");600 # Ensure the user is allowed to edit this collection 601 &authenticate_user($gsdl_cgi, $username, $collection); 602 602 603 603 my $gsdlhome = $ENV{'GSDLHOME'}; … … 639 639 $gsdl_cgi->delete("c"); 640 640 641 # Users must be in the <collection>-maintainer group to perform this action642 &authenticate_user($gsdl_cgi, $username, "$collection-maintainer");641 # Ensure the user is allowed to edit this collection 642 &authenticate_user($gsdl_cgi, $username, $collection); 643 643 644 644 # Make sure the collection isn't locked by someone else (unless we're running mkcol.pl, of course) … … 703 703 } 704 704 705 # Users must be in the <collection>-maintainer group to perform this action706 &authenticate_user($gsdl_cgi, $username, "$collection-maintainer");705 # Ensure the user is allowed to edit this collection 706 &authenticate_user($gsdl_cgi, $username, $collection); 707 707 708 708 my $gsdlhome = $ENV{'GSDLHOME'};
Note:
See TracChangeset
for help on using the changeset viewer.