mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-08 20:42:42 +00:00
Dropped support for wildcard in AuthComponent::allow()
Conflicts: lib/Cake/Controller/Component/AuthComponent.php
This commit is contained in:
parent
50b253565a
commit
841c0c2295
2 changed files with 6 additions and 10 deletions
|
@ -424,12 +424,8 @@ class AuthComponent extends Component {
|
|||
* You can use allow with either an array, or var args.
|
||||
*
|
||||
* `$this->Auth->allow(array('edit', 'add'));` or
|
||||
* `$this->Auth->allow('edit', 'add');`
|
||||
* `$this->Auth->allow();` to allow all actions.
|
||||
*
|
||||
* allow() also supports '*' as a wildcard to mean all actions.
|
||||
*
|
||||
* `$this->Auth->allow('*');`
|
||||
* `$this->Auth->allow('edit', 'add');` or
|
||||
* `$this->Auth->allow();` to allow all actions
|
||||
*
|
||||
* @param mixed $action,... Controller action name or array of actions
|
||||
* @return void
|
||||
|
@ -437,7 +433,7 @@ class AuthComponent extends Component {
|
|||
*/
|
||||
public function allow($action = null) {
|
||||
$args = func_get_args();
|
||||
if (empty($args) || $args == array('*')) {
|
||||
if (empty($args)) {
|
||||
$this->allowedActions = $this->_methods;
|
||||
} else {
|
||||
if (isset($args[0]) && is_array($args[0])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue