1<?
php declare(strict_types=1);
32 return 'usr_global_role';
48 $roleId =
$config[
'role_id'] ?? 0;
50 if (!is_numeric($roleId) || $roleId < 1 || is_float($roleId)) {
54 if (!$this->rbacReview->isGlobalRole($roleId)) {
58 $result = $this->rbacReview->isAssigned($user->
getId(), $roleId);
An exception for terminatinating execution or to throw for unit testing.
getId()
get object id @access public
class ilRbacReview Contains Review functions of core Rbac.
Class ilTermsOfServiceCriterionConfig.
Class ilTermsOfServiceUserHasGlobalRoleCriterionGUI.
Class ilTermsOfServiceUserHasGlobalRoleCriterion.
__construct(ilRbacReview $rbacReview, ilObjectDataCache $objectCache)
ilTermsOfServiceUserHasGlobalRoleCriterion constructor.
hasUniqueNature()
Returns whether or not a criterion is unique by it's nature.Example: "User Language"....
evaluate(ilObjUser $user, ilTermsOfServiceCriterionConfig $config)
bool
ui(ilLanguage $lng)
ilTermsOfServiceCriterionTypeGUI
getTypeIdent()
Returns a unique id of the criterion type.string
Interface ilTermsOfServiceCriterionTypeGUI.
Interface ilTermsOfServiceCriterionType.