Making AuthComponent::deny() case insensitive like allow(). Fixes #6261

This commit is contained in:
mark_story 2009-08-30 20:41:39 -04:00
parent c84b4cf36d
commit b4a1c4723d
2 changed files with 19 additions and 2 deletions

View file

@ -605,7 +605,7 @@ class AuthComponent extends Object {
if (isset($args[0]) && is_array($args[0])) {
$args = $args[0];
}
$this->allowedActions = array_merge($this->allowedActions, $args);
$this->allowedActions = array_merge($this->allowedActions, array_map($args, 'strtolower'));
}
}
@ -625,7 +625,7 @@ class AuthComponent extends Object {
$args = $args[0];
}
foreach ($args as $arg) {
$i = array_search($arg, $this->allowedActions);
$i = array_search(strtolower($arg), $this->allowedActions);
if (is_int($i)) {
unset($this->allowedActions[$i]);
}