From 2fae9280e58849530fddb49bca8f0a423cf356e7 Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Thu, 8 Aug 2013 17:17:35 +1200 Subject: [PATCH] FIX ArchiveDate enforcement --- code/controllers/ContentController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controllers/ContentController.php b/code/controllers/ContentController.php index 0ff261c5..9851f9df 100644 --- a/code/controllers/ContentController.php +++ b/code/controllers/ContentController.php @@ -108,7 +108,7 @@ class ContentController extends Controller { // 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->dataRecord->canViewStage(Versioned::current_stage())) { + if(!$this->dataRecord->canViewStage(Versioned::current_archived_date() ? 'Stage' : Versioned::current_stage())) { $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. Click here to go back to the published site.'); Session::clear('currentStage');