[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm roles.tab rolesplain.tab /lonnet/perl lonnet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 02 Nov 2004 23:22:48 -0000
albertel Tue Nov 2 18:22:48 2004 EDT
Modified files:
/loncom/auth lonroles.pm roles.tab rolesplain.tab
/loncom/lonnet/perl lonnet.pm
Log:
- make adv a real role priv
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.100 loncom/auth/lonroles.pm:1.101
--- loncom/auth/lonroles.pm:1.100 Mon Nov 1 18:23:33 2004
+++ loncom/auth/lonroles.pm Tue Nov 2 18:22:46 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.100 2004/11/01 23:23:33 albertel Exp $
+# $Id: lonroles.pm,v 1.101 2004/11/02 23:22:46 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -207,15 +207,15 @@
$ENV{'user.name'},
$ENV{'user.home'},
"Role ".$trolecode);
- my $tadv=0;
- if (($trolecode!~/^st/) &&
- ($trolecode!~/^ta/) &&
- ($trolecode!~/^cm/)) { $tadv=1; }
+
&Apache::lonnet::appenv(
- 'request.role' => $trolecode,
- 'request.role.adv' => $tadv,
+ 'request.role' => $trolecode,
'request.role.domain' => $cdom,
'request.course.sec' => $csec);
+ my $tadv=0;
+ if (&Apache::lonnet::allowed('adv') eq 'F') { $tadv=1; }
+ &Apache::lonnet::appenv('request.role.adv' => $tadv);
+
my $msg=&mt('Entering course ...');
if (($cnum) && ($role ne 'ca')) {
Index: loncom/auth/roles.tab
diff -u loncom/auth/roles.tab:1.30 loncom/auth/roles.tab:1.31
--- loncom/auth/roles.tab:1.30 Tue Oct 26 14:23:45 2004
+++ loncom/auth/roles.tab Tue Nov 2 18:22:47 2004
@@ -1,25 +1,28 @@
-su:s csu&U:sma:mau:cdc&U:dro:psa
-dc:s bre:sma
+su:s csu&U:sma:mau:cdc&U:dro:psa:adv
+dc:s bre:sma:adv
dc:d cli&UIK:cau&U:cdg&UIK:mau:ccc&U:cin&UIK:cta&UIK:cep&UIK:ccr&UIK:cst&UIK:cad&UIK:csc&UIK:dro:mky:psa:usc
-cc:s bre:sma:mcr:vsa
+cc:s bre:sma:mcr:vsa:adv
cc:c cin&IK:cta&IK:cep&IK:ccr&IK:cst&IK:are:cre:ere:vgr:gan:srm:opa:mgr:rin:pch:plc:mdc:usc:vsa
-in:s sma:vgr:mgr
+in:s sma:vgr:mgr:adv
in:c vgr:mgr:gan:dcm:srm:pch&C:plc&C:dch:pac:rin:las:opa:bre
ta:d sma
ta:c bre&RL:vgr&CR:mgr&CR:srm:pch&C:plc&C:dch:pac
+ep:s adv
ep:d sma
ep:c bre&R:mgr&R:dcm:las
+cr:s adv&SR
cr:d sma
cr:c bre&R:vgr&SCR:mgr&SCR:gan&SCR:dcm&SC:srm&SC:pch:plc:dch&S:pac:rin&S:las&SR:opa&SR:mdc&SR
st:d sma&L
st:c bre&RXL:pch&CL:plc&CL:pac&CL
+ad:s adv
ad:d sma
ad:c bre:gan:vgr:srm
-li:s gan:sma
+li:s gan:sma:adv
li:d mme
-au:s gan:sma:bre
+au:s gan:sma:bre:adv
au:d are:cre:ere:cca&IK
-ca:s gan:sma:bre
+ca:s gan:sma:bre:adv
ca:d are:cre:ere
dg:d bre&R
sc:d usc
Index: loncom/auth/rolesplain.tab
diff -u loncom/auth/rolesplain.tab:1.12 loncom/auth/rolesplain.tab:1.13
--- loncom/auth/rolesplain.tab:1.12 Wed Aug 11 19:39:52 2004
+++ loncom/auth/rolesplain.tab Tue Nov 2 18:22:47 2004
@@ -65,4 +65,5 @@
opa:Set assessment parameters
ain:Assume a student's identity
psa:Post system frontpage announcements
-usc:Upload Scantron data
\ No newline at end of file
+usc:Upload Scantron data
+adv:Advanced Role
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.557 loncom/lonnet/perl/lonnet.pm:1.558
--- loncom/lonnet/perl/lonnet.pm:1.557 Tue Nov 2 17:13:13 2004
+++ loncom/lonnet/perl/lonnet.pm Tue Nov 2 18:22:47 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.557 2004/11/02 22:13:13 albertel Exp $
+# $Id: lonnet.pm,v 1.558 2004/11/02 23:22:47 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2469,7 +2469,6 @@
my $author=0;
foreach (keys %allroles) {
%thesepriv=();
- if (($_!~/^st/) && ($_!~/^ta/) && ($_!~/^cm/)) { $adv=1; }
if (($_=~/^au/) || ($_=~/^ca/)) { $author=1; }
foreach (split(/:/,$allroles{$_})) {
if ($_ ne '') {
@@ -2481,6 +2480,7 @@
$thesepriv{$privilege}.=$restrictions;
}
}
+ if ($thesepriv{'adv'} eq 'F') { $adv=1; }
}
}
$thesestr='';