Disabled displaying SilverStripe Development Tools header when signed in user go to /dev/build page

This commit is contained in:
Mateusz Ksiazek 2016-01-12 17:01:42 +01:00
parent 1a6655b2e2
commit c20d5b6861

View File

@ -16,16 +16,15 @@ class DevBuildController extends Controller {
$da = DatabaseAdmin::create(); $da = DatabaseAdmin::create();
return $da->handleRequest($request, $this->model); return $da->handleRequest($request, $this->model);
} else { } else {
$renderer = DebugView::create(); if(Director::isDev() || Permission::check("ADMIN")) {
$renderer->writeHeader(); $renderer = DebugView::create();
$renderer->writeInfo("Environment Builder", Director::absoluteBaseURL()); $renderer->writeHeader();
echo "<div class=\"build\">"; $renderer->writeInfo("Environment Builder", Director::absoluteBaseURL());
echo "<div class=\"build\">";
}
$da = DatabaseAdmin::create(); $da = DatabaseAdmin::create();
return $da->handleRequest($request, $this->model); return $da->handleRequest($request, $this->model);
echo "</div>";
$renderer->writeFooter();
} }
} }