--- loncom/auth/lonroles.pm 2008/08/22 17:46:52 1.204 +++ loncom/auth/lonroles.pm 2008/09/02 02:56:52 1.205 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.204 2008/08/22 17:46:52 bisitz Exp $ +# $Id: lonroles.pm,v 1.205 2008/09/02 02:56:52 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -149,9 +149,12 @@ sub handler { # Check if author blocked ca-access my %blocked=&Apache::lonnet::get('environment',['domcoord.author'],$domain,$user); if ($blocked{'domcoord.author'} eq 'blocked') { - delete($env{$envkey}); - $env{'user.error.msg'}=':::1:User '.$user.' in domain '.$domain.' blocked domain coordinator access'; - last; + my %roleshash = &Apache::lonnet::get_my_roles($user,$domain); + if (!defined($roleshash{$env{'user.name'}.':'.$env{'user.domain'}.':ca'})) { + delete($env{$envkey}); + $env{'user.error.msg'}=':::1:User '.$user.' in domain '.$domain.' blocked domain coordinator access'; + last; + } } if ($dcroles{$domain}) { my ($server_status,$home) = &check_author_homeserver($user,$domain);