[LON-CAPA-cvs] cvs: loncom(version_1_1_1_s17) /auth lonroles.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 27 Jan 2004 23:07:13 -0000


albertel		Tue Jan 27 18:07:13 2004 EDT

  Modified files:              (Branch: version_1_1_1_s17)
    /loncom/auth	lonroles.pm 
  Log:
  - backport 1.83 for installation on s17
  
  
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.80 loncom/auth/lonroles.pm:1.80.2.1
--- loncom/auth/lonroles.pm:1.80	Tue Dec  9 16:25:53 2003
+++ loncom/auth/lonroles.pm	Tue Jan 27 18:07:13 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # User Roles Screen
 #
-# $Id: lonroles.pm,v 1.80 2003/12/09 21:25:53 albertel Exp $
+# $Id: lonroles.pm,v 1.80.2.1 2004/01/27 23:07:13 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -402,7 +402,10 @@
                 # First, Co-Authorship roles
                 if ($role eq 'ca') {
                     my $home = &Apache::lonnet::homeserver($trest,$tdom);
-                    if ($home ne $r->dir_config('lonHostID')) {
+		    my $allowed=0;
+		    my @ids=&Apache::lonnet::current_machine_ids();
+		    foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } }
+                    if (!$allowed) {
 			$button=0;
                         $switchserver=&Apache::lonnet::escape('http://'.
                          $Apache::lonnet::hostname{$home}.
@@ -422,7 +425,10 @@
                     # Authors
                     my $home = &Apache::lonnet::homeserver
                         ($ENV{'user.name'},$ENV{'user.domain'});
-                    if ($home ne $r->dir_config('lonHostID')) {
+		    my $allowed=0;
+		    my @ids=&Apache::lonnet::current_machine_ids();
+		    foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } }
+                    if (!$allowed) {
 			$button=0;
                         $switchserver=&Apache::lonnet::escape('http://'.
                          $Apache::lonnet::hostname{$home}.