Merge remote-tracking branch 'origin/3.1.0' into 3.1

This commit is contained in:
Ingo Schommer 2013-08-20 22:28:54 +02:00
commit f38d46224a

View File

@ -101,6 +101,11 @@ class ContentController extends Controller {
if($this->redirectedTo()) return; if($this->redirectedTo()) return;
// Check page permissions
if($this->dataRecord && $this->URLSegment != 'Security' && !$this->dataRecord->canView()) {
return Security::permissionFailure($this);
}
// Draft/Archive security check - only CMS users should be able to look at stage/archived content // Draft/Archive security check - only CMS users should be able to look at stage/archived content
if( if(
$this->URLSegment != 'Security' $this->URLSegment != 'Security'
@ -128,9 +133,10 @@ class ContentController extends Controller {
), ),
Controller::join_links($this->Link(), "?stage=Live") Controller::join_links($this->Link(), "?stage=Live")
); );
return Security::permissionFailure($this, $permissionMessage);
} }
return Security::permissionFailure($this, $permissionMessage);
} }
// Use theme from the site config // Use theme from the site config