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);
68 return new \ilTermsOfServiceUserHasGlobalRoleCriterionGUI($this,
$lng, $this->rbacReview, $this->objectCache);
An exception for terminatinating execution or to throw for unit testing.
class ilRbacReview Contains Review functions of core Rbac.
Class ilTermsOfServiceCriterionConfig.
Class ilTermsOfServiceUserHasGlobalRoleCriterion.
evaluate(\ilObjUser $user, \ilTermsOfServiceCriterionConfig $config)
bool
hasUniqueNature()
Returns whether or not a criterion is unique by it's nature.Example: "User Language"....
__construct(\ilRbacReview $rbacReview, \ilObjectDataCache $objectCache)
ilTermsOfServiceUserHasGlobalRoleCriterion constructor.
ui(\ilLanguage $lng)
\ilTermsOfServiceCriterionTypeGUI
getTypeIdent()
Returns a unique id of the criterion type.string
Interface ilTermsOfServiceCriterionTypeGUI.
Interface ilTermsOfServiceCriterionType.