Move stuff out of Page.php into ContentController so they aren't needed at default install

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@39074 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-07-20 04:05:51 +00:00
parent 78ee5b5d30
commit fccd958077

View File

@ -97,14 +97,18 @@ class ContentController extends Controller {
// Check permissions // Check permissions
if($this->dataRecord && !$this->dataRecord->can('View')) Security::permissionFailure($this); if($this->dataRecord && !$this->dataRecord->can('View')) Security::permissionFailure($this);
// Test/dev sites can only be accessed by CMS users Requirements::themedCSS("layout");
/* This is calling login errors in parents. inc. Requirements::themedCSS("typography");
if(!Director::isLive()) {
$member = Member::currentUser();
if(!$member || !$member->isCMSUser()) Security::permissionFailure($this);
} }
/**
* Get the project name
*
* @return string
*/ */
function project() {
global $project;
return $project;
} }
/** /**