File tree Expand file tree Collapse file tree 4 files changed +4
-16
lines changed
tests/TestCase/Controller Expand file tree Collapse file tree 4 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ working correctly. Some common problems are:
4545 itself to protect a potentially non-development environment.
46463 . If you are using the [ Authorization Plugin] ( https://github.com/cakephp/authorization )
4747 you need to set ` DebugKit.ignoreAuthorization ` to ` true ` in your config.
48+ Not needed anymore for DebugKit 5.3.0+.
4849
4950## Reporting Issues
5051
Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ Configuration
6262 // Ignore image paths
6363 Configure::write('DebugKit.ignorePathsPattern', '/\.(jpg|png|gif)$/');
6464
65- * ``DebugKit.ignoreAuthorization `` - Set to true to ignore Cake Authorization plugin for DebugKit requests. Disabled by default.
65+ * ``DebugKit.ignoreAuthorization `` - Set to true to ignore Cake Authorization plugin for DebugKit requests.
66+ Not needed anymore for DebugKit 5.3.0+.
6667
6768* ``DebugKit.maxDepth `` - Defines how many levels of nested data should be shown in general for debug output. Default is 5.
6869 WARNING: Increasing the max depth level can lead to an out of memory error.::
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public function beforeFilter(EventInterface $event): void
4343 // ignore it, only if `DebugKit.ignoreAuthorization` is set to true
4444 $ authorizationService = $ this ->getRequest ()->getAttribute ('authorization ' );
4545 if ($ authorizationService instanceof AuthorizationService) {
46- if (Configure::read ('DebugKit.ignoreAuthorization ' )) {
46+ if (Configure::read ('DebugKit.ignoreAuthorization ' ) || Configure:: read ( ' debug ' ) ) {
4747 $ authorizationService ->skipAuthorization ();
4848 } else {
4949 Log::info (
Original file line number Diff line number Diff line change @@ -66,20 +66,6 @@ private function _buildController()
6666 return new DebugKitController ($ request );
6767 }
6868
69- /**
70- * tests authorization is enabled but not ignored
71- *
72- * @return void
73- */
74- public function testDontIgnoreAuthorization ()
75- {
76- $ controller = $ this ->_buildController ();
77- $ event = new Event ('testing ' );
78- $ controller ->beforeFilter ($ event );
79-
80- $ this ->assertFalse ($ controller ->getRequest ()->getAttribute ('authorization ' )->authorizationChecked ());
81- }
82-
8369 /**
8470 * tests authorization is checked to avoid
8571 * AuthorizationRequiredException throwned
You can’t perform that action at this time.
0 commit comments