mirror of
https://github.com/silverstripe/silverstripe-testsession
synced 2024-10-22 14:06:00 +02:00
Don't require authentication for "test" environments
We use testsession to build up test state e.g. for checking logins, so having an admin logged-in to operate the testsession controller is counterproductive.
This commit is contained in:
parent
de47ef0ed1
commit
89a429c6a5
@ -21,7 +21,7 @@ class TestSessionController extends Controller {
|
|||||||
|
|
||||||
$canAccess = (
|
$canAccess = (
|
||||||
!Director::isLive()
|
!Director::isLive()
|
||||||
&& (Director::isDev() || Director::is_cli() || Permission::check("ADMIN"))
|
&& (Director::isDev() || Director::isTest() || Director::is_cli() || Permission::check("ADMIN"))
|
||||||
);
|
);
|
||||||
if(!$canAccess) return Security::permissionFailure($this);
|
if(!$canAccess) return Security::permissionFailure($this);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user