PHP Class Imbo\EventListener\AccessControl
This event listener will listen to all access-controlled resources and check if the public key
has access to the requested resource. If the public key does not have access to the resource,
the listener will throw an exception resulting in a HTTP response with 400 Bad Request.
It will also handle loading of ACL-related resources such as resource groups.
Datei anzeigen
Open project: imbo/imbo
Public Methods
Method |
Description |
|
__construct ( array $params = null ) |
Class constructor |
|
checkAccess ( Imbo\EventManager\EventInterface $event ) |
Check if the public key used has access to this resource for this user |
|
getSubscribedEvents ( ) |
|
|
loadGroups ( Imbo\EventManager\EventInterface $event ) |
Load groups from the configured access control adapter |
|
subscribe ( Imbo\EventManager\EventInterface $event ) |
Figure out which resources we have available and subscribe to them |
|
Method Details
__construct()
public method
checkAccess()
public method
Check if the public key used has access to this resource for this user
public checkAccess ( Imbo\EventManager\EventInterface $event ) |
$event |
Imbo\EventManager\EventInterface |
|
getSubscribedEvents()
public static method
loadGroups()
public method
Load groups from the configured access control adapter
public loadGroups ( Imbo\EventManager\EventInterface $event ) |
$event |
Imbo\EventManager\EventInterface |
An event instance |
subscribe()
public method
Figure out which resources we have available and subscribe to them
public subscribe ( Imbo\EventManager\EventInterface $event ) |
$event |
Imbo\EventManager\EventInterface |
|