mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API Require ADMIN for ?showtemplate=1
This commit is contained in:
parent
78d21b511c
commit
45c68d6821
@ -401,7 +401,7 @@ class SSViewer {
|
||||
}
|
||||
|
||||
|
||||
if(isset($_GET['showtemplate']) && !Director::isLive()) {
|
||||
if(isset($_GET['showtemplate']) && $_GET['showtemplate'] && Permission::check('ADMIN')) {
|
||||
$lines = file($cacheFile);
|
||||
echo "<h2>Template: $cacheFile</h2>";
|
||||
echo "<pre>";
|
||||
@ -680,7 +680,7 @@ class SSViewer_FromString extends SSViewer {
|
||||
fwrite($fh, $template);
|
||||
fclose($fh);
|
||||
|
||||
if(isset($_GET['showtemplate']) && $_GET['showtemplate']) {
|
||||
if(isset($_GET['showtemplate']) && $_GET['showtemplate'] && Permission::check('ADMIN')) {
|
||||
$lines = file($tmpFile);
|
||||
echo "<h2>Template: $tmpFile</h2>";
|
||||
echo "<pre>";
|
||||
|
Loading…
Reference in New Issue
Block a user