This repository was archived by the owner on Apr 7, 2020. It is now read-only.
  
  
  - 
                Notifications
    You must be signed in to change notification settings 
- Fork 33
AclManager API
        Problematic edited this page Sep 14, 2011 
        ·
        4 revisions
      
    I have some thoughts for the future of the AclManager API; trying to make it as flexible as possible, here are some example uses:
Possible verbs:
- add()
- remove()
- to()
- for()
- with()
- flush()
- permit()
- deny()
- on()
<?php
// add edit to comment 3 for ted
$aclManager->add($mask)->to($entity)->for($user);
// add ted to comment 3 with edit
$aclManager->add($user)->to($entity)->with($mask);
// add edit to ted for comment 3
$aclManager->add($mask)->to($user)->for($entity);
// permit edit to ted on comment 3
$aclManager->permit($mask)->to($user)->on($entity);
// permit edit for ted on comment 3
$aclManager->permit($mask)->for($user)->on($entity);
// permit ted to edit on comment 3
$aclManager->permit($user)->to($mask)->on($entity);How to handle class-based ACLs?
There would probably be an explicit flush() method to complete the chain and return the AclManager for fluent interface.