mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
78ee5b5d30
commit
fccd958077
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user