[LON-CAPA-cvs] cvs: loncom(version_1_1_1_s17) /publisher lonpublisher.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 27 Jan 2004 23:11:23 -0000
albertel Tue Jan 27 18:11:23 2004 EDT
Modified files: (Branch: version_1_1_1_s17)
/loncom/publisher lonpublisher.pm
Log:
- backport 1.163 to 1.1.1 for use on s17
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.145.2.1 loncom/publisher/lonpublisher.pm:1.145.2.1.2.1
--- loncom/publisher/lonpublisher.pm:1.145.2.1 Tue Jan 20 18:02:20 2004
+++ loncom/publisher/lonpublisher.pm Tue Jan 27 18:11:23 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpublisher.pm,v 1.145.2.1 2004/01/20 23:02:20 albertel Exp $
+# $Id: lonpublisher.pm,v 1.145.2.1.2.1 2004/01/27 23:11:23 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1731,12 +1731,14 @@
return HTTP_NOT_ACCEPTABLE;
}
- unless (&Apache::lonnet::homeserver($cuname,$cudom)
- eq $r->dir_config('lonHostID')) {
+ my $home=&Apache::lonnet::homeserver($cuname,$cudom);
+ my $allowed=0;
+ my @ids=&Apache::lonnet::current_machine_ids();
+ foreach my $id (@ids) { if ($id eq $home) { $allowed = 1; } }
+ unless ($allowed) {
$r->log_reason($cuname.' at '.$cudom.
' trying to publish file '.$ENV{'form.filename'}.
- ' ('.$fn.') - not homeserver ('.
- &Apache::lonnet::homeserver($cuname,$cudom).')',
+ ' ('.$fn.') - not homeserver ('.$home.')',
$r->filename);
return HTTP_NOT_ACCEPTABLE;
}