--- loncom/lonnet/perl/lonnet.pm 2006/11/28 19:46:00 1.809 +++ loncom/lonnet/perl/lonnet.pm 2006/11/29 07:46:40 1.810 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.809 2006/11/28 19:46:00 raeburn Exp $ +# $Id: lonnet.pm,v 1.810 2006/11/29 07:46:40 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3554,12 +3554,21 @@ sub customaccess { # ------------------------------------------------- Check for a user privilege sub allowed { - my ($priv,$uri,$symb)=@_; + my ($priv,$uri,$symb,$role)=@_; my $ver_orguri=$uri; $uri=&deversion($uri); my $orguri=$uri; $uri=&declutter($uri); + if ($priv eq 'evb') { +# Evade communication block restrictions for specified role in a course + if ($env{'user.priv.'.$role} =~/evb\&([^\:]*)/) { + return $1; + } else { + return; + } + } + if (defined($env{'allowed.'.$priv})) { return $env{'allowed.'.$priv}; } # Free bre access to adm and meta resources if (((($uri=~/^adm\//) && ($uri !~ m{/(?:smppg|bulletinboard)$})) @@ -7715,7 +7724,7 @@ passed in @what from the requested user' =item * -allowed($priv,$uri,$symb) : check for a user privilege; returns codes for allowed actions +allowed($priv,$uri,$symb,$role) : check for a user privilege; returns codes for allowed actions F: full access U,I,K: authentication modes (cxx only) '': forbidden