[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
www
lon-capa-cvs@mail.lon-capa.org
Sat, 10 May 2003 23:00:40 -0000
www Sat May 10 19:00:40 2003 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
* fixed course advanced role routine (one really should not sort a hash)
* domain coordinator in charge of users in their domain, not only roles in
their domain
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.372 loncom/lonnet/perl/lonnet.pm:1.373
--- loncom/lonnet/perl/lonnet.pm:1.372 Thu May 8 18:23:19 2003
+++ loncom/lonnet/perl/lonnet.pm Sat May 10 19:00:39 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.372 2003/05/08 22:23:19 albertel Exp $
+# $Id: lonnet.pm,v 1.373 2003/05/10 23:00:39 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1260,8 +1260,8 @@
} else {
$returnhash{$key}=$username.':'.$domain;
}
- }
- return sort %returnhash;
+ }
+ return %returnhash;
}
# ---------------------------------------------------------- Course ID routines
@@ -2641,7 +2641,7 @@
} else {
my $cwosec=$url;
$cwosec=~s/^\/(\w+)\/(\w+)\/.*/$1\/$2/;
- unless (&allowed('c'.$role,$cwosec)) {
+ unless ((&allowed('c'.$role,$cwosec)) || &allowed('c'.$role,$udom)) {
&logthis('Refused assignrole: '.
$udom.' '.$uname.' '.$url.' '.$role.' '.$end.' '.$start.' by '.
$ENV{'user.name'}.' at '.$ENV{'user.domain'});
@@ -2661,10 +2661,11 @@
}
# actually delete
if ($deleteflag) {
- if (&allowed('dro',$udom)) {
+ if ((&allowed('dro',$udom)) || (&allowed('dro',$url))) {
# modify command to delete the role
$command="encrypt:rolesdel:$ENV{'user.domain'}:$ENV{'user.name'}:".
"$udom:$uname:$url".'_'."$mrole";
+ &logthis("$ENV{'user.name'} at $ENV{'user.domain'} deletes $mrole in $url for $uname at $udom");
# set start and finish to negative values for userrolelog
$start=-1;
$end=-1;