Changeset 11941
- Timestamp:
- 2006-06-20T10:03:20+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/cgi-bin/gliserver.pl
r11940 r11941 106 106 107 107 # Only authenticate if it is enabled 108 return if (!$authentication_enabled);108 return "all-collections-editor" if (!$authentication_enabled); 109 109 110 110 if ((!defined $user_password) || ($user_password =~ m/^\s*$/)) { … … 143 143 } 144 144 145 # If we're not editing a collection then the user doesn't need to be in a particular group146 if ($collection eq "") {147 return; # Authentication successful148 }149 150 145 # Check group 151 146 my ($user_groups) = ($user_data =~ /\<groups\>(.*)/); 147 if ($collection eq "") { 148 # If we're not editing a collection then the user doesn't need to be in a particular group 149 return $user_groups; # Authentication successful 150 } 152 151 foreach my $user_group (split(/\,/, $user_groups)) { 153 152 # Does this user have access to all collections? 154 153 if ($user_group eq "all-collections-editor") { 155 return ; # Authentication successful154 return $user_groups; # Authentication successful 156 155 } 157 156 # Does this user have access to personal collections, and is this one? 158 157 if ($user_group eq "personal-collections-editor" && $collection =~ /^$username\-/) { 159 return ; # Authentication successful158 return $user_groups; # Authentication successful 160 159 } 161 160 # Does this user have access to this collection 162 161 if ($user_group eq "$collection-collection-editor") { 163 return ; # Authentication successful162 return $user_groups; # Authentication successful 164 163 } 165 164 }
Note:
See TracChangeset
for help on using the changeset viewer.