[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /lonnet/perl lonnet.pm
raeburn
raeburn at source.lon-capa.org
Sun Nov 13 17:44:35 EST 2016
raeburn Sun Nov 13 22:44:35 2016 EDT
Modified files: (Branch: version_2_11_X)
/loncom/lonnet/perl lonnet.pm
Log:
- For 2.11
- Backport 1.1329
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1172.2.85 loncom/lonnet/perl/lonnet.pm:1.1172.2.86
--- loncom/lonnet/perl/lonnet.pm:1.1172.2.85 Sun Oct 30 01:48:38 2016
+++ loncom/lonnet/perl/lonnet.pm Sun Nov 13 22:44:34 2016
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1172.2.85 2016/10/30 01:48:38 raeburn Exp $
+# $Id: lonnet.pm,v 1.1172.2.86 2016/11/13 22:44:34 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -5718,14 +5718,17 @@
}
sub check_adhoc_privs {
- my ($cdom,$cnum,$update,$refresh,$now,$checkrole,$caller) = @_;
+ my ($cdom,$cnum,$update,$refresh,$now,$checkrole,$caller,$sec) = @_;
my $cckey = 'user.role.'.$checkrole.'./'.$cdom.'/'.$cnum;
+ if ($sec) {
+ $cckey .= '/'.$sec;
+ }
my $setprivs;
if ($env{$cckey}) {
my ($role,$where,$trolecode,$tstart,$tend,$tremark,$tstatus,$tpstart,$tpend);
&role_status($cckey,$update,$refresh,$now,\$role,\$where,\$trolecode,\$tstatus,\$tstart,\$tend);
unless (($tstatus eq 'is') || ($tstatus eq 'will_not')) {
- &set_adhoc_privileges($cdom,$cnum,$checkrole,$caller);
+ &set_adhoc_privileges($cdom,$cnum,$checkrole,$caller,$sec);
$setprivs = 1;
}
} else {
@@ -5737,8 +5740,11 @@
sub set_adhoc_privileges {
# role can be cc, ca, or cr/<dom>/<dom>-domainconfig/role
- my ($dcdom,$pickedcourse,$role,$caller) = @_;
+ my ($dcdom,$pickedcourse,$role,$caller,$sec) = @_;
my $area = '/'.$dcdom.'/'.$pickedcourse;
+ if ($sec ne '') {
+ $area .= '/'.$sec;
+ }
my $spec = $role.'.'.$area;
my %userroles = &set_arearole($role,$area,'','',$env{'user.domain'},
$env{'user.name'},1);
More information about the LON-CAPA-cvs
mailing list