--- loncom/auth/lonroles.pm 2003/12/09 21:25:53 1.80 +++ loncom/auth/lonroles.pm 2004/02/10 19:23:11 1.80.4.1 @@ -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.4.1 2004/02/10 19:23:11 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -402,7 +402,10 @@ ENDHEADER # 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 @@ ENDHEADER # 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}.