--- loncom/lonnet/perl/lonnet.pm 2005/06/17 16:53:07 1.640 +++ loncom/lonnet/perl/lonnet.pm 2005/06/17 21:04:40 1.642 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.640 2005/06/17 16:53:07 albertel Exp $ +# $Id: lonnet.pm,v 1.642 2005/06/17 21:04:40 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1380,7 +1380,7 @@ sub extract_embedded_items { movie => '', ); my $p = HTML::LCParser->new($filepath.'/'.$file); - while ($t=$p->get_token()) { + while (my $t=$p->get_token()) { if ($t->[0] eq 'S') { my ($tagname, $attr) = ($t->[1],$t->[2]); push (@state, $tagname); @@ -2969,6 +2969,12 @@ sub allowed { # If this is generating or modifying users, exit with special codes if (':csu:cdc:ccc:cin:cta:cep:ccr:cst:cad:cli:cau:cdg:cca:'=~/\:\Q$priv\E\:/) { + if ($priv eq 'cca') { + my ($audom,$auname)=split('/',$uri); + if (($auname ne $env{'user.name'} && $env{'request.role'} !~ /^dc\./) || + (($audom ne $env{'user.domain'} && $env{'request.role'} !~ /^dc\./) && + ($audom ne $env{'request.role.domain'}))) { return ''; } + } return $thisallowed; } #