02.27
php
saved
aranworld
Note
This modification to the Auth::action() function allows you to use the Acl component to control access to urls including the id value. Without this modification, the Auth component ignores the id parameter in the URL.
This modification to the Auth::action() function allows you to use the Acl component to control access to urls including the id value. Without this modification, the Auth component ignores the id parameter in the URL.
- /**
- * modified cake/libs/controller/components/auth.php
- *
- * enables Auth to check for id in URL, so that you can
- * assign permissions to aco elements that are identified by
- * an id value.
- */
- function action($action = ':controller/:action') {
- $actionModifier = null;
- $actionModifier = '/'.$this->params['named']['id'];
- // assume that an argument which is numeric and in first position is an id
- $actionModifier = '/'.$this->params['pass'][0];
- }
- array(Inflector::camelize($this->params['controller']),
- $this->params['action']),
- $this->actionPath . $action . $actionModifier
- );
- }
Parsed in 0.047 seconds, using GeSHi 1.0.7.14