version 1.809, 2006/11/28 19:46:00
|
version 1.810, 2006/11/29 07:46:40
|
Line 3554 sub customaccess {
|
Line 3554 sub customaccess {
|
# ------------------------------------------------- Check for a user privilege |
# ------------------------------------------------- Check for a user privilege |
|
|
sub allowed { |
sub allowed { |
my ($priv,$uri,$symb)=@_; |
my ($priv,$uri,$symb,$role)=@_; |
my $ver_orguri=$uri; |
my $ver_orguri=$uri; |
$uri=&deversion($uri); |
$uri=&deversion($uri); |
my $orguri=$uri; |
my $orguri=$uri; |
$uri=&declutter($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}; } |
if (defined($env{'allowed.'.$priv})) { return $env{'allowed.'.$priv}; } |
# Free bre access to adm and meta resources |
# Free bre access to adm and meta resources |
if (((($uri=~/^adm\//) && ($uri !~ m{/(?:smppg|bulletinboard)$})) |
if (((($uri=~/^adm\//) && ($uri !~ m{/(?:smppg|bulletinboard)$})) |
Line 7715 passed in @what from the requested user'
|
Line 7724 passed in @what from the requested user'
|
|
|
=item * |
=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 |
F: full access |
U,I,K: authentication modes (cxx only) |
U,I,K: authentication modes (cxx only) |
'': forbidden |
'': forbidden |