Definition at line 8 of file AccessCheck.php.
◆ checkAccess()
Check that the user has access to the statistics.
If the user doesn't have access, send the user to the login page.
Definition at line 15 of file AccessCheck.php.
References $as, $attributes, $authsource, $useridattr, SimpleSAML\Logger\debug(), SimpleSAML_Configuration\getBoolean(), SimpleSAML_Configuration\getString(), SimpleSAML_Configuration\getValue(), and SimpleSAML\Utils\Auth\requireAdmin().
17 $protected = $statconfig->
getBoolean(
'protected',
false);
19 $allowedusers = $statconfig->
getValue(
'allowedUsers', null);
22 $acl = $statconfig->
getValue(
'acl', null);
23 if ($acl !== null && !is_string($acl) && !is_array($acl)) {
53 if (!empty($allowedusers)) {
56 throw new Exception(
'User ID is missing');
60 if (in_array(
$attributes[$useridattr][0], $allowedusers,
true)) {
static requireAdmin()
Require admin access to the current page.
getValue($name, $default=null)
Retrieve a configuration option set in config.php.
Attribute-related utility methods.
getBoolean($name, $default=self::REQUIRED_OPTION)
This function retrieves a boolean configuration option.
if(array_key_exists('yes', $_REQUEST)) $attributes
getString($name, $default=self::REQUIRED_OPTION)
This function retrieves a string configuration option.
The documentation for this class was generated from the following file:
- libs/composer/vendor/simplesamlphp/simplesamlphp/modules/statistics/lib/AccessCheck.php