version 1.42, 2006/11/23 01:49:41
|
version 1.45, 2007/02/01 07:13:59
|
Line 36 use Fcntl qw(:flock);
|
Line 36 use Fcntl qw(:flock);
|
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::lonacc; |
use Apache::lonacc; |
|
use LONCAPA qw(:DEFAULT :match); |
|
|
sub constructaccess { |
sub constructaccess { |
my ($url,$ownerdomain)=@_; |
my ($url,$ownerdomain)=@_; |
my ($ownername)=($url=~/\/(?:\~|priv\/|home\/)(\w+)\//); |
my ($ownername)=($url=~/\/(?:\~|priv\/|home\/)($match_username)\//); |
unless (($ownername) && ($ownerdomain)) { return ''; } |
unless (($ownername) && ($ownerdomain)) { return ''; } |
# We do not allow editing of previous versions of files. |
# We do not allow editing of previous versions of files. |
if ($url=~/\.(\d+)\.(\w+)$/) { return ''; } |
if ($url=~/\.(\d+)\.(\w+)$/) { return ''; } |