Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ce27e26
Support aliases in ARO table
houseoftech Jun 17, 2013
5a3b55d
Move config variables to config file
houseoftech Mar 19, 2015
a7820ff
Cache ACOs to speed up listing of permissions
houseoftech Mar 19, 2015
4fb4b30
Bootstraperize the permissions page
houseoftech Mar 19, 2015
03d754a
Merge branch 'master' into stable
houseoftech Mar 19, 2015
7998ca7
Merge branch 'master' of https://github.com/FMCorz/AclManager into up…
houseoftech Mar 19, 2015
5622202
Bump to version 1.2.5 likah they said
houseoftech Mar 19, 2015
24a6a37
Merge branch 'upstream-pull'
houseoftech Mar 19, 2015
0f8f8fd
Merge branch 'master' into stable
houseoftech Mar 19, 2015
80edc84
Point composer to houseoftech fork
houseoftech Mar 19, 2015
22521d9
Merge branch 'stable'
houseoftech Mar 19, 2015
fe5bd85
Update composer.json
houseoftech Mar 20, 2015
7dbbba4
Update composer.json
houseoftech Mar 23, 2015
077149e
Update README.md
Oxicode Jan 25, 2016
2b4f1be
Merge pull request #1 from Oxicode/patch-1
houseoftech Jan 28, 2016
12e97ab
Merge branch 'master' into stable
houseoftech Feb 17, 2016
0a51e14
Update paths in readme
houseoftech Feb 17, 2016
40e7c13
Merge branch 'master' into stable
houseoftech Feb 17, 2016
0d20255
Optimize permissions lookup
houseoftech Mar 16, 2016
be2d5f3
The $acos array is already formatted
houseoftech Mar 16, 2016
83074e0
Remove extra whitespace
houseoftech Mar 16, 2016
e29506a
Merge branch 'stable'
houseoftech Mar 16, 2016
3d79ea5
Remove cacheing of acos
houseoftech Mar 17, 2016
919dcdf
Update version
houseoftech Mar 17, 2016
76f0709
Merge branch 'master' into stable
houseoftech Mar 17, 2016
c5cd193
Support wildcards in ignoreActions setting
houseoftech Mar 19, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions Config/acl_manager.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php
/**
* Acl Manager Config File
*
* This will be loaded by the AclManger plugin and merged into its configuration
*
* copy this file to your App/Config/ folder
*/

$config['AclManager'] = array(
/**
* List of AROs (Class aliases)
* Order is important! Parent to Children
*/
'aros' => array('Role', 'User'),

/**
* Aliases to write into ARO table
*/
// 'aro_aliases' => array('Group' => 'name', 'User' => 'username'),

/**
* Limit used to paginate AROs
* Replace {alias} with ARO alias
* '{alias}' => array('limit' => 3)
*/
// 'Role' => array('limit' => 3),

/**
* Routing Prefix
* Set the prefix you would like to restrict the plugin to
* @see Configure::read('Routing.prefixes')
*/
// 'prefix' => 'admin',

/**
* Ugly identation?
* Turn off when using CSS
*/
'uglyIdent' => true,

/**
* Actions to ignore when looking for new ACOs
* Format: 'action', 'Controller/action' or 'Plugin.Controller/action'
*/
'ignoreActions' => array('isAuthorized'),

/**
* List of ARO models to load
* Use only if AclManager.aros aliases are different from model name
*/
// 'models' => array('Group', 'Customer'),

'version' => "1.3.1"
);
57 changes: 11 additions & 46 deletions Config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,55 +13,20 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

/**
* List of AROs (Class aliases)
* Order is important! Parent to Children
*/
Configure::write('AclManager.aros', array('Role', 'User'));

/**
* Limit used to paginate AROs
* Replace {alias} with ARO alias
* Configure::write('AclManager.{alias}.limit', 3)
*/
// Configure::write('AclManager.Role.limit', 3);

/**
* Routing Prefix
* Set the prefix you would like to restrict the plugin to
* @see Configure::read('Routing.prefixes')
*/
// Configure::write('AclManager.prefix', 'admin');

/**
* Ugly identation?
* Turn off when using CSS
*/
Configure::write('AclManager.uglyIdent', true);

/**
* Actions to ignore when looking for new ACOs
* Format: 'action', 'Controller/action' or 'Plugin.Controller/action'
*/
Configure::write('AclManager.ignoreActions', array('isAuthorized'));
// Default to Plugin config which can be overwritten by local app config
Configure::load('AclManager.acl_manager');
$defaultConfig = Configure::read('AclManager');

/**
* List of ARO models to load
* Use only if AclManager.aros aliases are different than model name
*/
// Configure::write('AclManager.models', array('Group', 'Customer'));
$config = array();
// Local app config
if (file_exists(APP . 'Config' . DS . 'acl_manager.php')) {
Configure::load('acl_manager', 'default', false);
$config = Configure::read('AclManager');
}

/**
* END OF USER SETTINGS
*/
$config = array_merge($defaultConfig, $config);
Configure::write('AclManager', $config);

Configure::write("AclManager.version", "1.2.5");
if (!is_array(Configure::read('AclManager.aros'))) {
Configure::write('AclManager.aros', array(Configure::read('AclManager.aros')));
}
if (!is_array(Configure::read('AclManager.ignoreActions'))) {
Configure::write('AclManager.ignoreActions', array(Configure::read('AclManager.ignoreActions')));
}
if (!Configure::read('AclManager.models')) {
Configure::write('AclManager.models', Configure::read('AclManager.aros'));
}
Loading