Class humhub\components\access\PermissionAccessValidator

Inheritancehumhub\components\access\PermissionAccessValidator » humhub\components\access\ActionAccessValidator » humhub\components\access\AccessValidator » yii\base\BaseObject
Subclasseshumhub\components\access\DeprecatedPermissionAccessValidator, humhub\modules\content\components\ContentContainerPermissionAccess

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$access humhub\components\access\ControllerAccess Access instance humhub\components\access\AccessValidator
$actionFilter boolean Determines if this validator is only interested in action related rules or all validator related rules humhub\components\access\AccessValidator
$code integer Http error code used in case the validation failes humhub\components\access\AccessValidator
$name humhub\components\access\PermissionAccessValidator
$reason string Validator error message humhub\components\access\AccessValidator
$strict humhub\components\access\PermissionAccessValidator

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
extractActions() humhub\components\access\PermissionAccessValidator
filterRelatedRules() Filters out all rules which are not related to this validator. humhub\components\access\AccessValidator
getRuleName() Extracts the ruleName from the given array. humhub\components\access\AccessValidator
isActionRelated() Checks if the current action is contained in the given $rule. humhub\components\access\AccessValidator
validate() humhub\components\access\PermissionAccessValidator
verifyPermission() Checks if the user has the given $permission. humhub\components\access\PermissionAccessValidator

Property Details

$name public property
public $name 'permission'
$strict public property
public $strict false

Method Details

extractActions() protected method

protected void extractActions ( $rule )
$rule
validate() protected method

protected void validate ( $rule )
$rule
verifyPermission() protected method

Checks if the user has the given $permission.

protected boolean verifyPermission ( $permission, $rule )
$permission
$rule array
return boolean

True if the given $permission is granted