[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 04 Dec 2006 22:03:15 -0000
albertel Mon Dec 4 17:03:15 2006 EDT
Modified files:
/loncom/interface loncommon.pm
Log:
- use the new functionality in lonnet::allowed to check this
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.484 loncom/interface/loncommon.pm:1.485
--- loncom/interface/loncommon.pm:1.484 Fri Dec 1 17:19:33 2006
+++ loncom/interface/loncommon.pm Mon Dec 4 17:03:15 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.484 2006/12/01 22:19:33 albertel Exp $
+# $Id: loncommon.pm,v 1.485 2006/12/04 22:03:15 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2936,13 +2936,10 @@
$tdom,$spec,$trest,$area);
}
my ($author,$adv) = &Apache::lonnet::set_userprivs(\%userroles,\%allroles);
- if ($userroles{'user.priv.'.$checkrole} =~ /evb\&([^\:]*)/) {
- if ($1) {
- $no_userblock = 1;
- last;
- }
- }
- } else {
+ $no_userblock = &Apache::lonnet::allowed('evb',undef,undef,
+ $checkrole);
+ last if $no_userblock;
+ } else {
if (&Apache::lonnet::allowed('evb',undef,undef,$checkrole)) {
$no_ownblock = 1;
last;