--- loncom/auth/lonacc.pm 2001/08/12 01:18:37 1.20 +++ loncom/auth/lonacc.pm 2001/09/26 14:07:45 1.21 @@ -3,7 +3,7 @@ # 5/21/99,5/22,5/29,5/31,6/15,16/11,22/11, # 01/06,01/13,05/31,06/01,09/06,09/25,09/28,10/30,11/6, # 12/25,12/26, -# 01/06/01,05/28,8/11 Gerd Kortemeyer +# 01/06/01,05/28,8/11,9/26 Gerd Kortemeyer package Apache::lonacc; @@ -137,8 +137,18 @@ sub handler { }; } +# -------------------------------------------- See if this is a public resource + if (&Apache::lonnet::metadata($requrl,'copyright') eq 'public') { + &Apache::lonnet::logthis('Granting public access: '.$requrl); + $ENV{'user.name'}='public'; + $ENV{'user.domain'}='public'; + $ENV{'request.state'} = "published"; + $ENV{'request.publicaccess'} = 1; + $ENV{'request.filename'} = $r->filename; + return OK; + } # ----------------------------------------------- Store where they wanted to go - + $ENV{'request.firsturl'}=$requrl; return FORBIDDEN; }