mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00:00
Merge pull request #824 from hafriedlander/fix/archivedate
FIX ArchiveDate enforcement
This commit is contained in:
commit
d7d0cb45ae
@ -108,7 +108,7 @@ class ContentController extends Controller {
|
|||||||
|
|
||||||
// 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($this->URLSegment != 'Security' && !Session::get('unsecuredDraftSite') && (Versioned::current_archived_date() || (Versioned::current_stage() && Versioned::current_stage() != 'Live'))) {
|
if($this->URLSegment != 'Security' && !Session::get('unsecuredDraftSite') && (Versioned::current_archived_date() || (Versioned::current_stage() && Versioned::current_stage() != 'Live'))) {
|
||||||
if(!$this->dataRecord->canViewStage(Versioned::current_stage())) {
|
if(!$this->dataRecord->canViewStage(Versioned::current_archived_date() ? 'Stage' : Versioned::current_stage())) {
|
||||||
$link = $this->Link();
|
$link = $this->Link();
|
||||||
$message = _t("ContentController.DRAFT_SITE_ACCESS_RESTRICTION", 'You must log in with your CMS password in order to view the draft or archived content. <a href="%s">Click here to go back to the published site.</a>');
|
$message = _t("ContentController.DRAFT_SITE_ACCESS_RESTRICTION", 'You must log in with your CMS password in order to view the draft or archived content. <a href="%s">Click here to go back to the published site.</a>');
|
||||||
Session::clear('currentStage');
|
Session::clear('currentStage');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user