| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- //Permissions stuff
- /*
- Access::config(array(
- 'permissions' => array(
- 'adapter' => 'Permissions',
- 'model' => 'app\models\Perms',
- 'defaultNoUser' => array(),
- 'defaultUser' => array(
- 'route' => array(
- 'users' => array(
- 'logout', 'account'
- )
- )
- ),
- 'userIdentifier' => 'PrincipalID'
- )
- ));
- Perms::applyFilter('find', function($self, $params, $chain) {
- if($params['type'] != 'first') {
- return $chain->next($self, $params, $chain);
- }
- $cacheKey = 'permissions_' . $params['options']['conditions']['id'];
- $cache = Cache::read('default', $cacheKey);
- if($cache) {
- return $cache;
- }
- $result = $chain->next($self, $params, $chain);
- Cache::write('default', $cacheKey, $result, '+1 day');
- return $result;
- });
- */
- ?>
|