[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
raeburn at source.lon-capa.org
Sun Apr 19 16:34:25 EDT 2015
raeburn Sun Apr 19 20:34:25 2015 EDT
- Reinstate documentation changes for allowed() in 1.1281, unintentionally
removed in rev. 1.1282.
diff -u loncom/lonnet/perl/lonnet.pm:1.1283 loncom/lonnet/perl/lonnet.pm:1.1284
--- loncom/lonnet/perl/lonnet.pm:1.1283 Wed Apr 15 18:56:19 2015
+++ loncom/lonnet/perl/lonnet.pm Sun Apr 19 20:34:25 2015
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
-# $Id: lonnet.pm,v 1.1283 2015/04/15 18:56:19 raeburn Exp $
+# $Id: lonnet.pm,v 1.1284 2015/04/19 20:34:25 raeburn Exp $
# Copyright Michigan State University Board of Trustees
@@ -13052,13 +13052,29 @@
-allowed($priv,$uri,$symb,$role) : check for a user privilege; returns codes for allowed actions
+allowed($priv,$uri,$symb,$role,$clientip,$noblockcheck) : check for a user privilege;
+returns codes for allowed actions.
+The first argument is required, all others are optional.
+$priv is the privilege being checked.
+$uri contains additional information about what is being checked for access (e.g.,
+URL, course ID etc.).
+$symb is the unique resource instance identifier in a course; if needed,
+but not provided, it will be retrieved via a call to &symbread().
+$role is the role for which a priv is being checked (only used if priv is evb).
+$clientip is the user's IP address (only used when checking for access to portfolio
+$noblockcheck, if true, skips calls to &has_comm_blocking() for the bre priv. This
+prevents recursive calls to &allowed.
F: full access
U,I,K: authentication modes (cxx only)
1: user needs to choose course
2: browse allowed
A: passphrase authentication needed
+ B: access temporarily blocked because of a blocking event in a course.
More information about the LON-CAPA-cvs