Skip to content

Commit

Permalink
bypass DebugKit urls in default permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
arusinowski committed Oct 30, 2023
1 parent e3ce604 commit 24381ec
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/permissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@
'controller' => 'Pages',
'action' => 'display',
],
[
'role' => '*',
'plugin' => 'DebugKit',
'controller' => '*',
'action' => '*',
'bypassAuth' => true,
],
];

$preload = \Cake\Core\Configure::read('CakeDC/Auth.preloadPermissions', []);
Expand Down
7 changes: 7 additions & 0 deletions src/Rbac/Permissions/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ public function __construct(array $config = [])
'controller' => 'Pages',
'action' => 'display',
],
[
'role' => '*',
'plugin' => 'DebugKit',
'controller' => '*',
'action' => '*',
'bypassAuth' => true,
],
];
}

Expand Down
7 changes: 7 additions & 0 deletions tests/TestCase/Rbac/RbacTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ public function setUp(): void
'controller' => 'Pages',
'action' => 'display',
],
[
'role' => '*',
'plugin' => 'DebugKit',
'controller' => '*',
'action' => '*',
'bypassAuth' => true,
],
];
$this->rbac = new Rbac($this->defaultPermissions);
}
Expand Down

0 comments on commit 24381ec

Please sign in to comment.