File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed
tests/Authentication/Filters Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -65,12 +65,12 @@ class Auth extends BaseConfig
6565 * to apply any logic you may need.
6666 */
6767 public array $ redirects = [
68- 'register ' => '/ ' ,
69- 'login ' => '/ ' ,
70- 'logout ' => 'login ' ,
71- 'force_reset ' => '/ ' ,
72- 'after_permission_denied ' => '/ ' ,
73- 'after_group_denied ' => '/ ' ,
68+ 'register ' => '/ ' ,
69+ 'login ' => '/ ' ,
70+ 'logout ' => 'login ' ,
71+ 'force_reset ' => '/ ' ,
72+ 'permission_denied ' => '/ ' ,
73+ 'group_denied ' => '/ ' ,
7474 ];
7575
7676 /**
@@ -481,9 +481,9 @@ public function forcePasswordResetRedirect(): string
481481 * Returns the URL the user should be redirected to
482482 * if permission denied.
483483 */
484- public function afterPermissionDeniedRedirect (): string
484+ public function permissionDeniedRedirect (): string
485485 {
486- $ url = setting ('Auth.redirects ' )['after_permission_denied ' ];
486+ $ url = setting ('Auth.redirects ' )['permission_denied ' ];
487487
488488 return $ this ->getUrl ($ url );
489489 }
@@ -492,9 +492,9 @@ public function afterPermissionDeniedRedirect(): string
492492 * Returns the URL the user should be redirected to
493493 * if group denied.
494494 */
495- public function afterGroupDeniedRedirect (): string
495+ public function groupDeniedRedirect (): string
496496 {
497- $ url = setting ('Auth.redirects ' )['after_group_denied ' ];
497+ $ url = setting ('Auth.redirects ' )['group_denied ' ];
498498
499499 return $ this ->getUrl ($ url );
500500 }
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ public function testFilterIncorrectGroupNoPrevious(): void
7070 ->get ('protected-route ' );
7171
7272 // Should redirect to home page since previous_url is not set
73- $ result ->assertRedirectTo (config (Auth::class)->afterGroupDeniedRedirect ());
73+ $ result ->assertRedirectTo (config (Auth::class)->groupDeniedRedirect ());
7474 // Should have error message
7575 $ result ->assertSessionHas ('error ' , lang ('Auth.notEnoughPrivilege ' ));
7676 }
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ public function testFilterIncorrectGroupNoPrevious(): void
7070 ->get ('protected-route ' );
7171
7272 // Should redirect to home page since previous_url is not set
73- $ result ->assertRedirectTo (config (Auth::class)->afterPermissionDeniedRedirect ());
73+ $ result ->assertRedirectTo (config (Auth::class)->permissionDeniedRedirect ());
7474 // Should have error message
7575 $ result ->assertSessionHas ('error ' , lang ('Auth.notEnoughPrivilege ' ));
7676 }
You can’t perform that action at this time.
0 commit comments