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:
Ingo Schommer 2013-12-12 01:08:29 +01:00
parent de47ef0ed1
commit 89a429c6a5

View File

@ -21,7 +21,7 @@ class TestSessionController extends Controller {
$canAccess = (
!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);
}