PHP 클래스 Webiny\Component\Security\Authorization\AccessControl

상속: use trait Webiny\Component\StdLib\StdLibTrait, use trait Webiny\Component\Http\HttpTrait, use trait Webiny\Component\ServiceManager\ServiceManagerTrait
파일 보기 프로젝트 열기: Webiny/Framework 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$currentPath Webiny\Component\StdLib\StdObject\StringObject\StringObject Current path - based on current request.

공개 메소드들

메소드 설명
__construct ( AbstractUser $user, ConfigObject $config ) Base constructor.
isUserAllowedAccess ( ) : boolean Checks if current user is allowed access.

비공개 메소드들

메소드 설명
getAccessDecision ( array $requestedRoles ) : boolean This method get the votes from all the voters and sends them to the ruling.
getCurrentPath ( ) : StringObject Returns current path (url) as StringObject instance.
getRequestedRoles ( ) : array Returns an array of roles required by the access rule.
getVoters ( ) : array Creates an array of registered Voters.
setDecisionStrategy ( ) Sets the decision strategy based on the application configuration.
testPath ( string $path ) : boolean Tests the given $path if it's within the current request path.
whatsTheRuling ( integer $votes, integer $maxVotes ) : boolean Method that decides if access is allowed or not based on the results of votes and the defined decision strategy.

메소드 상세

__construct() 공개 메소드

Base constructor.
public __construct ( AbstractUser $user, ConfigObject $config )
$user Webiny\Component\Security\User\AbstractUser Instance of current user.
$config Webiny\Component\Config\ConfigObject Access control configuration.

isUserAllowedAccess() 공개 메소드

Checks if current user is allowed access.
public isUserAllowedAccess ( ) : boolean
리턴 boolean

프로퍼티 상세

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

Current path - based on current request.
protected StringObject,Webiny\Component\StdLib\StdObject\StringObject $currentPath
리턴 Webiny\Component\StdLib\StdObject\StringObject\StringObject