mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Update tests.
The old tests were relying on the fixed inherit bug. Instead check a specific permission which will result in a deny. Refs #8114
This commit is contained in:
parent
b2509ea13d
commit
4389c79442
2 changed files with 1 additions and 2 deletions
|
@ -129,7 +129,6 @@ class Permission extends AppModel {
|
||||||
$perms = Hash::extract($perms, '{n}.' . $this->alias);
|
$perms = Hash::extract($perms, '{n}.' . $this->alias);
|
||||||
foreach ($perms as $perm) {
|
foreach ($perms as $perm) {
|
||||||
if ($action === '*') {
|
if ($action === '*') {
|
||||||
|
|
||||||
foreach ($permKeys as $key) {
|
foreach ($permKeys as $key) {
|
||||||
if (!empty($perm)) {
|
if (!empty($perm)) {
|
||||||
if ($perm[$key] == -1) {
|
if ($perm[$key] == -1) {
|
||||||
|
|
|
@ -253,7 +253,7 @@ class AclShellTest extends CakeTestCase {
|
||||||
$this->Task->args = array('AuthUser.2', 'ROOT/Controller1', 'create');
|
$this->Task->args = array('AuthUser.2', 'ROOT/Controller1', 'create');
|
||||||
$this->Task->check();
|
$this->Task->check();
|
||||||
|
|
||||||
$this->Task->args = array('AuthUser.2', 'ROOT/Controller1', '*');
|
$this->Task->args = array('AuthUser.2', 'ROOT/Controller1', 'delete');
|
||||||
$this->Task->check();
|
$this->Task->check();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue