void addACL(
object
$acl)
|
|
Adds an ACL object to the athentication chain
Use this method to add your ACL object to the authentication chain used when isAllowed is called. Adding your object will cause the method isAllowed of your object to be called when a resource is to be accessed
Tags:
Parameters:
void addResource(
string
$resourcename)
|
|
Use this method to add a resource to the ACL system, so you can query later for it
This method is useful for you to add a resource to the ACL system, that is, 'something' in your application which access is restricted for 'someone'.
By default, all pages and all controls are added as resources, so you can specify rules to control the access to pages, even to the control level.
Tags:
Parameters:
Holds the role to be used when querying about allowed actions
This property should be set to the user/role you want to use when querying the ACL system, tipically the user name or the group name
Tags:
boolean isAllowed(
[string
$role = null], [string
$resource = null], [string
$privilege = null])
|
|
Use this method to check if an specific role (user/group/etc) is allowed to access a resource
This method is called by components to know if they are able to perform an specific action and you can also use it to check if a user has access to some resource of your app. Iterates through all the ACL objects added using addACL and call the method isAllowed of each of them until gets a positive.
Tags:
Parameters: