Class NPermission
Access control list (ACL) functionality and privileges management.
This solution is mostly based on Zend_Acl (c) Zend Technologies USA Inc. (http://www.zend.com), new BSD license
- NObject
- NPermission implements IAuthorizator
Copyright: Copyright (c) 2005, 2007 Zend Technologies USA Inc.
Author: David Grudl
Located at Security/Permission.php
public
|
|
public
boolean
|
|
public
array
|
|
public
array
|
|
public
boolean
|
#
roleInheritsFrom( string $role, string $inherit, boolean $onlyParents = FALSE )
Returns TRUE if $role inherits from $inherit. If $onlyParents is TRUE, then $role must inherit directly from $inherit. |
public
|
|
public
|
|
public
|
#
addResource( string $resource, string $parent = NULL )
Adds a Resource having an identifier unique to the list. |
public
boolean
|
|
public
array
|
|
public
boolean
|
#
resourceInheritsFrom( string $resource, string $inherit, boolean $onlyParent = FALSE )
Returns TRUE if $resource inherits from $inherit. If $onlyParents is TRUE, then $resource must inherit directly from $inherit. |
public
|
|
public
|
|
public
|
#
allow( string|array|
Allows one or more Roles access to [certain $privileges upon] the specified Resource(s). If $assertion is provided, then it must return TRUE in order for rule to apply. |
public
|
#
deny( string|array|
Denies one or more Roles access to [certain $privileges upon] the specified Resource(s). If $assertion is provided, then it must return TRUE in order for rule to apply. |
public
|
#
removeAllow( string|array|
Removes "allow" permissions from the list in the context of the given Roles, Resources, and privileges. |
public
|
#
removeDeny( string|array|
Removes "deny" restrictions from the list in the context of the given Roles, Resources, and privileges. |
protected
|
#
setRule( boolean $toAdd, boolean $type, string|array|
Performs operations on Access Control List rules. |
public
boolean
|
#
isAllowed( string|
Returns TRUE if and only if the Role has access to [certain $privileges upon] the Resource. |
public
mixed
|
|
public
mixed
|
__call(),
__callStatic(),
__get(),
__isset(),
__set(),
__unset(),
extensionMethod(),
getReflection()
|
ALL,
ALLOW,
DENY
|
public read-only
array
|
$roles | |
public read-only
array
|
$resources | |
public read-only
mixed
|
$queriedRole | |
public read-only
mixed
|
$queriedResource |
$reflection
|