PHP 클래스 Neos\Flow\Security\Policy\PolicyService

The access decision voters get the roles and privileges configured (in the security policy) for a specific method invocation from this service.
파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$configurationManager Neos\Flow\Configuration\ConfigurationManager
$initialized boolean
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$policyConfiguration array
$privilegeTargets Neos\Flow\Security\Authorization\Privilege\PrivilegeTarget[]
$roles Role[]

공개 메소드들

메소드 설명
getAllPrivilegesByType ( string $type ) : array Returns all privileges of the given type
getPrivilegeTargetByIdentifier ( string $privilegeTargetIdentifier ) : PrivilegeTarget Returns the privilege target identified by the given string
getPrivilegeTargets ( ) : PrivilegeTarget[] Returns all configured privilege targets
getRole ( string $roleIdentifier ) : Role Returns a Role object configured in the PolicyService
getRoles ( boolean $includeAbstract = false ) : Role[] Returns an array of all configured roles
hasRole ( string $roleIdentifier ) : boolean Checks if a role exists
injectConfigurationManager ( ConfigurationManager $configurationManager ) : void This object is created very early so we can't rely on AOP for the property injection
injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void This object is created very early so we can't rely on AOP for the property injection
reset ( ) : void Resets the PolicyService to behave transparently during functional testing.

보호된 메소드들

메소드 설명
emitConfigurationLoaded ( array &$policyConfiguration ) : void Emits a signal when the policy configuration has been loaded
emitRolesInitialized ( array &$roles ) : void Emits a signal when roles have been initialized
initialize ( ) : void Parses the global policy configuration and initializes roles and privileges accordingly
initializePrivilegeTargets ( ) : void Initialized all configured privilege targets from the policy definitions

메소드 상세

emitConfigurationLoaded() 보호된 메소드

This signal can be used to add roles and/or privilegeTargets during runtime. In the slot make sure to receive the $policyConfiguration array by reference so you can alter it.
protected emitConfigurationLoaded ( array &$policyConfiguration ) : void
$policyConfiguration array The policy configuration
리턴 void

emitRolesInitialized() 보호된 메소드

This signal can be used to register roles during runtime. In the slot make sure to receive the $roles array by reference so you can alter it.
protected emitRolesInitialized ( array &$roles ) : void
$roles array
리턴 void

getAllPrivilegesByType() 공개 메소드

Returns all privileges of the given type
public getAllPrivilegesByType ( string $type ) : array
$type string Full qualified class or interface name
리턴 array

getPrivilegeTargetByIdentifier() 공개 메소드

Returns the privilege target identified by the given string
public getPrivilegeTargetByIdentifier ( string $privilegeTargetIdentifier ) : PrivilegeTarget
$privilegeTargetIdentifier string Identifier of a privilege target
리턴 Neos\Flow\Security\Authorization\Privilege\PrivilegeTarget

getPrivilegeTargets() 공개 메소드

Returns all configured privilege targets
public getPrivilegeTargets ( ) : PrivilegeTarget[]
리턴 Neos\Flow\Security\Authorization\Privilege\PrivilegeTarget[]

getRole() 공개 메소드

Returns a Role object configured in the PolicyService
public getRole ( string $roleIdentifier ) : Role
$roleIdentifier string The role identifier of the role, format: (:)
리턴 Role

getRoles() 공개 메소드

Returns an array of all configured roles
public getRoles ( boolean $includeAbstract = false ) : Role[]
$includeAbstract boolean If TRUE the result includes abstract roles, otherwise those will be skipped
리턴 Role[] Array of all configured roles, indexed by role identifier

hasRole() 공개 메소드

Checks if a role exists
public hasRole ( string $roleIdentifier ) : boolean
$roleIdentifier string The role identifier, format: (:)
리턴 boolean

initialize() 보호된 메소드

Parses the global policy configuration and initializes roles and privileges accordingly
protected initialize ( ) : void
리턴 void

initializePrivilegeTargets() 보호된 메소드

Initialized all configured privilege targets from the policy definitions
protected initializePrivilegeTargets ( ) : void
리턴 void

injectConfigurationManager() 공개 메소드

This object is created very early so we can't rely on AOP for the property injection
public injectConfigurationManager ( ConfigurationManager $configurationManager ) : void
$configurationManager Neos\Flow\Configuration\ConfigurationManager The configuration manager
리턴 void

injectObjectManager() 공개 메소드

This object is created very early so we can't rely on AOP for the property injection
public injectObjectManager ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager ) : void
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
리턴 void

reset() 공개 메소드

Resets the PolicyService to behave transparently during functional testing.
public reset ( ) : void
리턴 void

프로퍼티 상세

$configurationManager 보호되어 있는 프로퍼티

protected ConfigurationManager,Neos\Flow\Configuration $configurationManager
리턴 Neos\Flow\Configuration\ConfigurationManager

$initialized 보호되어 있는 프로퍼티

protected bool $initialized
리턴 boolean

$objectManager 보호되어 있는 프로퍼티

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
리턴 Neos\Flow\ObjectManagement\ObjectManagerInterface

$policyConfiguration 보호되어 있는 프로퍼티

protected array $policyConfiguration
리턴 array

$privilegeTargets 보호되어 있는 프로퍼티

protected PrivilegeTarget[],Neos\Flow\Security\Authorization\Privilege $privilegeTargets
리턴 Neos\Flow\Security\Authorization\Privilege\PrivilegeTarget[]

$roles 보호되어 있는 프로퍼티

protected Role[],Neos\Flow\Security\Policy $roles
리턴 Role[]