[LON-CAPA-cvs] cvs: loncom(version_2_3_X) /lonnet/perl lonnet.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Tue, 24 Apr 2007 19:38:18 -0000
albertel Tue Apr 24 15:38:18 2007 EDT
Modified files: (Branch: version_2_3_X)
/loncom/lonnet/perl lonnet.pm
Log:
- backport 1.865
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.824.2.3 loncom/lonnet/perl/lonnet.pm:1.824.2.4
--- loncom/lonnet/perl/lonnet.pm:1.824.2.3 Sat Mar 17 00:13:06 2007
+++ loncom/lonnet/perl/lonnet.pm Tue Apr 24 15:38:15 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.824.2.3 2007/03/17 04:13:06 albertel Exp $
+# $Id: lonnet.pm,v 1.824.2.4 2007/04/24 19:38:15 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3461,9 +3461,16 @@
}
if (@users > 0) {
foreach my $userkey (@users) {
- if (exists($access_hash->{$userkey}{'users'}{$env{'user.name'}.':'.$env{'user.domain'}})) {
- return 'ok';
- }
+ if (ref($access_hash->{$userkey}{'users'}) eq 'ARRAY') {
+ foreach my $item (@{$access_hash->{$userkey}{'users'}}) {
+ if (ref($item) eq 'HASH') {
+ if (($item->{'uname'} eq $env{'user.name'}) &&
+ ($item->{'udom'} eq $env{'user.domain'})) {
+ return 'ok';
+ }
+ }
+ }
+ }
}
}
my %roleshash;