|
|
@@ -43,7 +43,11 @@ class AclBehavior extends ModelBehavior {
|
|
|
* @return void
|
|
|
*/
|
|
|
public function setup($model, $config = array()) {
|
|
|
- $this->settings[$model->name] = array_merge(array('type' => 'controlled'), (array)$config);
|
|
|
+ if (isset($config[0])) {
|
|
|
+ $config['type'] = $config[0];
|
|
|
+ unset($config[0]);
|
|
|
+ }
|
|
|
+ $this->settings[$model->name] = array_merge(array('type' => 'controlled'), $config);
|
|
|
$this->settings[$model->name]['type'] = strtolower($this->settings[$model->name]['type']);
|
|
|
|
|
|
$types = $this->_typeMaps[$this->settings[$model->name]['type']];
|