[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Tue, 05 Dec 2006 01:51:49 -0000
raeburn Mon Dec 4 20:51:49 2006 EDT
Modified files:
/loncom/interface loncommon.pm
Log:
Reverting to 1.484.
The evb check is done explicitly against the userroles hash, because we are checking privs for a user other than the logged in user. lonnet::allowed is not used because it looks at $env{'user.priv...}, i.e., the user's own privs.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.485 loncom/interface/loncommon.pm:1.486
--- loncom/interface/loncommon.pm:1.485 Mon Dec 4 17:03:15 2006
+++ loncom/interface/loncommon.pm Mon Dec 4 20:51:48 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.485 2006/12/04 22:03:15 albertel Exp $
+# $Id: loncommon.pm,v 1.486 2006/12/05 01:51:48 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2936,9 +2936,12 @@
$tdom,$spec,$trest,$area);
}
my ($author,$adv) = &Apache::lonnet::set_userprivs(\%userroles,\%allroles);
- $no_userblock = &Apache::lonnet::allowed('evb',undef,undef,
- $checkrole);
- last if $no_userblock;
+ if ($userroles{'user.priv.'.$checkrole} =~ /evb\&([^\:]*)/) {
+ if ($1) {
+ $no_userblock = 1;
+ last;
+ }
+ }
} else {
if (&Apache::lonnet::allowed('evb',undef,undef,$checkrole)) {
$no_ownblock = 1;