Permissionable provides row level permissions to a CakePHP application that mimic the UNIX filesystem methods by providing owner, group and other permission levels.
- checkout the code $ cd /path/to/your/app/plugins && git clone git://github.com/jmcneese/permissionable.git
- create needed schema $ cake schema create Permissionable.permission
- add the component to needed controllers (or AppController) public $components = array('Permissionable.Permissionable');
- modify permissionable/controllers/components/permissionable.php to set user_id, primary group_id and secondary group_ids, so Permissionable knows who the logged in user is
- add the behavior to needed models (or AppModel) public $actsAs = array('Permissionable.Permissionable' => array('defaultBits'=>480));
Further documentation including additional ways of configuring Permissionable can be found here and here.
If you have any issues with Permissionable please open a ticket on the github issue tracker
If you'd like to contribute to Permissionable, feel free to fork the project and submit patches!