[LON-CAPA-cvs] cvs: loncom /auth loncacc.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Tue, 10 Dec 2002 20:37:21 -0000
matthew Tue Dec 10 15:37:21 2002 EDT
Modified files:
/loncom/auth loncacc.pm
Log:
Remainder of fix for bug 262. Do not allow editing of old versions of
resources in the construction space.
Index: loncom/auth/loncacc.pm
diff -u loncom/auth/loncacc.pm:1.23 loncom/auth/loncacc.pm:1.24
--- loncom/auth/loncacc.pm:1.23 Mon Sep 30 16:35:38 2002
+++ loncom/auth/loncacc.pm Tue Dec 10 15:37:21 2002
@@ -2,7 +2,7 @@
# Cookie Based Access Handler for Construction Area
# (lonacc: 5/21/99,5/22,5/29,5/31 Gerd Kortemeyer)
#
-# $Id: loncacc.pm,v 1.23 2002/09/30 20:35:38 albertel Exp $
+# $Id: loncacc.pm,v 1.24 2002/12/10 20:37:21 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -48,7 +48,8 @@
my ($url,$ownerdomain)=@_;
my ($ownername)=($url=~/\/(?:\~|priv\/|home\/)(\w+)/);
unless (($ownername) && ($ownerdomain)) { return ''; }
-
+ # We do not allow editing of previous versions of files.
+ if ($url=~/\.(\d+)\.(\w+)$/) { return ''; }
if (($ownername eq $ENV{'user.name'}) &&
($ownerdomain eq $ENV{'user.domain'})) {
return ($ownername,$ownerdomain);