Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Dropped support for wildcard in AuthComponent::allow()

Conflicts:

	lib/Cake/Controller/Component/AuthComponent.php
  • Loading branch information...
commit 841c0c2295b75f220c3da2c9e971cd1d718fdaaa 1 parent 50b2535
@Danielpk Danielpk authored markstory committed
View
10 lib/Cake/Controller/Component/AuthComponent.php
@@ -424,12 +424,8 @@ public function constructAuthorize() {
* 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 @@ public function constructAuthorize() {
*/
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])) {
View
6 lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php
@@ -628,7 +628,7 @@ public function testAllowDenyAll() {
$this->Controller->request['action'] = 'camelCase';
$this->assertFalse($this->Controller->Auth->startup($this->Controller));
- $this->Controller->Auth->allow('*');
+ $this->Controller->Auth->allow();
$this->Controller->Auth->deny(array('add', 'camelCase'));
$this->Controller->request['action'] = 'delete';
@@ -663,7 +663,7 @@ public function testAllowDenyAll() {
*/
public function testDenyWithCamelCaseMethods() {
$this->Controller->Auth->initialize($this->Controller);
- $this->Controller->Auth->allow('*');
+ $this->Controller->Auth->allow();
$this->Controller->Auth->deny('add', 'camelCase');
$url = '/auth_test/camelCase';
@@ -685,7 +685,7 @@ public function testAllowedActionsWithCamelCaseMethods() {
$this->Controller->Auth->initialize($this->Controller);
$this->Controller->Auth->loginAction = array('controller' => 'AuthTest', 'action' => 'login');
$this->Controller->Auth->userModel = 'AuthUser';
- $this->Controller->Auth->allow('*');
+ $this->Controller->Auth->allow();
$result = $this->Controller->Auth->startup($this->Controller);
$this->assertTrue($result, 'startup() should return true, as action is allowed. %s');
Please sign in to comment.
Something went wrong with that request. Please try again.