PHP Class Xpressengine\Permission\Policy

Author: XE Developers ([email protected])
Afficher le fichier Open project: xpressengine/xpressengine

Protected Properties

Свойство Type Description
$perm PermissionHandler PermissionHandler instance
$vgroups Xpressengine\User\Repositories\VirtualGroupRepositoryInterface VirtualGroupRepository instance

Méthodes publiques

Méthode Description
__construct ( PermissionHandler $perm, Xpressengine\User\Repositories\VirtualGroupRepositoryInterface $vgroups ) Policy constructor.

Méthodes protégées

Méthode Description
check ( Xpressengine\User\UserInterface $user, Permission $permission, string $action ) : boolean Check allows
checker ( Xpressengine\User\UserInterface $user, string $type, mixed $value ) : boolean 타입에 맞는 권한 판별 메서드를 호출 함.
extractExcepts ( array &$grants ) : array Extract except user information
get ( string $name, string $siteKey = 'default' ) : Permission | null Get a permission
groupInspect ( Xpressengine\User\UserInterface $user, array $criterion ) : boolean User 가 속한 그룹이 권한이 있는지 판별.
isExcepted ( Xpressengine\User\UserInterface $user, array $userIds = [] ) : boolean Check except user
isGuest ( Xpressengine\User\UserInterface $user ) : boolean 전달된 사용자가 guest 인지 확인
ratingInspect ( Xpressengine\User\UserInterface $user, string $criterion ) : boolean User 가 권한이 있는 등급인지 판별
userInspect ( Xpressengine\User\UserInterface $user, array $criterion ) : boolean User 가 권한이 있는 대상으로 지정되어 있는지 판별
userRating ( Xpressengine\User\UserInterface $user ) : string Get a User's rating keyword
vgroupInspect ( Xpressengine\User\UserInterface $user, array $criterion ) : boolean User 가 속한 가상그룹이 권한이 있는지 판별.

Method Details

__construct() public méthode

Policy constructor.
public __construct ( PermissionHandler $perm, Xpressengine\User\Repositories\VirtualGroupRepositoryInterface $vgroups )
$perm PermissionHandler PermissionHandler instance
$vgroups Xpressengine\User\Repositories\VirtualGroupRepositoryInterface VirtualGroupRepository instance

check() protected méthode

Check allows
protected check ( Xpressengine\User\UserInterface $user, Permission $permission, string $action ) : boolean
$user Xpressengine\User\UserInterface user instance
$permission Permission permission instance
$action string action keyword
Résultat boolean

checker() protected méthode

타입에 맞는 권한 판별 메서드를 호출 함.
protected checker ( Xpressengine\User\UserInterface $user, string $type, mixed $value ) : boolean
$user Xpressengine\User\UserInterface user instance
$type string check type
$value mixed given value
Résultat boolean

extractExcepts() protected méthode

Extract except user information
protected extractExcepts ( array &$grants ) : array
$grants array all grants information
Résultat array user identifiers

get() protected méthode

Get a permission
protected get ( string $name, string $siteKey = 'default' ) : Permission | null
$name string permission name
$siteKey string site key name
Résultat Permission | null

groupInspect() protected méthode

User 가 속한 그룹이 권한이 있는지 판별.
protected groupInspect ( Xpressengine\User\UserInterface $user, array $criterion ) : boolean
$user Xpressengine\User\UserInterface user instance
$criterion array criterion group ids
Résultat boolean

isExcepted() protected méthode

Check except user
protected isExcepted ( Xpressengine\User\UserInterface $user, array $userIds = [] ) : boolean
$user Xpressengine\User\UserInterface user instance
$userIds array except target identifiers
Résultat boolean

isGuest() protected méthode

전달된 사용자가 guest 인지 확인
protected isGuest ( Xpressengine\User\UserInterface $user ) : boolean
$user Xpressengine\User\UserInterface user instance
Résultat boolean

ratingInspect() protected méthode

User 가 권한이 있는 등급인지 판별
protected ratingInspect ( Xpressengine\User\UserInterface $user, string $criterion ) : boolean
$user Xpressengine\User\UserInterface user instance
$criterion string user rating keyword
Résultat boolean

userInspect() protected méthode

User 가 권한이 있는 대상으로 지정되어 있는지 판별
protected userInspect ( Xpressengine\User\UserInterface $user, array $criterion ) : boolean
$user Xpressengine\User\UserInterface user instance
$criterion array criterion user ids
Résultat boolean

userRating() protected méthode

Get a User's rating keyword
protected userRating ( Xpressengine\User\UserInterface $user ) : string
$user Xpressengine\User\UserInterface user instance
Résultat string

vgroupInspect() protected méthode

User 가 속한 가상그룹이 권한이 있는지 판별.
protected vgroupInspect ( Xpressengine\User\UserInterface $user, array $criterion ) : boolean
$user Xpressengine\User\UserInterface user instance
$criterion array criterion vgroup ids
Résultat boolean

Property Details

$perm protected_oe property

PermissionHandler instance
protected PermissionHandler,Xpressengine\Permission $perm
Résultat PermissionHandler

$vgroups protected_oe property

VirtualGroupRepository instance
protected VirtualGroupRepositoryInterface,Xpressengine\User\Repositories $vgroups
Résultat Xpressengine\User\Repositories\VirtualGroupRepositoryInterface