diff --git a/dev/DevBuildController.php b/dev/DevBuildController.php index 28f3a0a3a..5a989f273 100644 --- a/dev/DevBuildController.php +++ b/dev/DevBuildController.php @@ -16,15 +16,16 @@ class DevBuildController extends Controller { $da = DatabaseAdmin::create(); return $da->handleRequest($request, $this->model); } else { - if(Director::isDev() || Permission::check("ADMIN")) { - $renderer = DebugView::create(); - $renderer->writeHeader(); - $renderer->writeInfo("Environment Builder", Director::absoluteBaseURL()); - echo "
"; - } + $renderer = DebugView::create(); + $renderer->writeHeader(); + $renderer->writeInfo("Environment Builder", Director::absoluteBaseURL()); + echo "
"; $da = DatabaseAdmin::create(); return $da->handleRequest($request, $this->model); + + echo "
"; + $renderer->writeFooter(); } } diff --git a/dev/DevelopmentAdmin.php b/dev/DevelopmentAdmin.php index 554595031..c6963a7d2 100644 --- a/dev/DevelopmentAdmin.php +++ b/dev/DevelopmentAdmin.php @@ -33,7 +33,7 @@ class DevelopmentAdmin extends Controller { parent::init(); // Special case for dev/build: Defer permission checks to DatabaseAdmin->init() (see #4957) - $requestedDevBuild = (stripos($this->getRequest()->getURL(), 'dev/build') === 0); + $requestedDevBuild = (stripos($this->getRequest()->getURL(), 'dev/build') === 0 && !Security::database_is_ready()); // We allow access to this controller regardless of live-status or ADMIN permission only // if on CLI. Access to this controller is always allowed in "dev-mode", or of the user is ADMIN.