--- loncom/lonnet/perl/lonnet.pm 2011/10/24 12:05:58 1.1140 +++ loncom/lonnet/perl/lonnet.pm 2011/10/31 13:44:37 1.1141 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.1140 2011/10/24 12:05:58 www Exp $ +# $Id: lonnet.pm,v 1.1141 2011/10/31 13:44:37 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -5909,6 +5909,15 @@ sub allowed { $thisallowed.=$1; } } + +# User who is not author or co-author might still be able to edit +# resource of an author in the domain (e.g., if Domain Coordinator). + if (($priv eq 'eco') && ($thisallowed eq '') && ($env{'request.course.id'}) && + (&allowed('mdc',$env{'request.course.id'}))) { + if ($env{"user.priv.cm./$uri/"}=~/\Q$priv\E\&([^\:]*)/) { + $thisallowed.=$1; + } + } # Course: uri itself is a course my $courseuri=$uri;