mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge branch '2.0' of github.com:cakephp/cakephp into 2.0
This commit is contained in:
commit
6196e74339
3 changed files with 24 additions and 5 deletions
|
@ -116,10 +116,28 @@ abstract class BaseAuthorize {
|
|||
}
|
||||
|
||||
/**
|
||||
* Maps crud actions to actual controller names. Used to modify or get the current mapped actions.
|
||||
* Maps crud actions to actual action names. Used to modify or get the current mapped actions.
|
||||
*
|
||||
* Create additional mappings for a standard CRUD operation:
|
||||
*
|
||||
* {{{
|
||||
* $this->Auth->mapActions(array('create' => array('add', 'register'));
|
||||
* }}}
|
||||
*
|
||||
* Create mappings for custom CRUD operations:
|
||||
*
|
||||
* {{{
|
||||
* $this->Auth->mapActions(array('my_action' => 'admin'));
|
||||
* }}}
|
||||
*
|
||||
* You can use the custom CRUD operations to create additional generic permissions
|
||||
* that behave like CRUD operations. Doing this will require additional columns on the
|
||||
* permissions lookup. When using with DbAcl, you'll have to add additional _admin type columns
|
||||
* to the `aros_acos` table.
|
||||
*
|
||||
* @param mixed $map Either an array of mappings, or undefined to get current values.
|
||||
* @return mixed Either the current mappings or null when setting.
|
||||
* @see AuthComponent::mapActions()
|
||||
*/
|
||||
public function mapActions($map = array()) {
|
||||
if (empty($map)) {
|
||||
|
|
|
@ -477,7 +477,7 @@ class AuthComponent extends Component {
|
|||
*
|
||||
* @param array $map Actions to map
|
||||
* @return void
|
||||
* @link http://book.cakephp.org/view/1260/mapActions
|
||||
* @see BaseAuthorize::mapActions()
|
||||
*/
|
||||
public function mapActions($map = array()) {
|
||||
if (empty($this->_authorizeObjects)) {
|
||||
|
|
|
@ -75,13 +75,13 @@ class Debugger {
|
|||
),
|
||||
'txt' => array(
|
||||
'error' => "{:error}: {:code} :: {:description} on line {:line} of {:path}\n{:info}",
|
||||
'context' => "Context:\n{:context}\n",
|
||||
'trace' => "Trace:\n{:trace}\n",
|
||||
'code' => '',
|
||||
'info' => ''
|
||||
),
|
||||
'base' => array(
|
||||
'traceLine' => '{:reference} - {:path}, line {:line}'
|
||||
'traceLine' => '{:reference} - {:path}, line {:line}',
|
||||
'trace' => "Trace:\n{:trace}\n",
|
||||
'context' => "Context:\n{:context}\n",
|
||||
),
|
||||
'log' => array(),
|
||||
);
|
||||
|
@ -670,6 +670,7 @@ class Debugger {
|
|||
return;
|
||||
}
|
||||
|
||||
$data['trace'] = $trace;
|
||||
$data['id'] = 'cakeErr' . uniqid();
|
||||
$tpl = array_merge($this->_templates['base'], $this->_templates[$this->_outputFormat]);
|
||||
$insert = array('context' => join("\n", $context)) + $data;
|
||||
|
|
Loading…
Reference in a new issue