BUG: Unpublish permission decoupled from publish permission.

This commit is contained in:
Mojmir Fendek 2020-08-31 12:48:43 +12:00
parent c58144ad6d
commit 39b8d14634

View File

@ -2371,7 +2371,7 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
}
// "unpublish"
if ($isPublished && $canPublish && $isOnDraft && $canUnpublish) {
if ($isPublished && $isOnDraft && $canUnpublish) {
$moreOptions->push(
FormAction::create('unpublish', _t(__CLASS__.'.BUTTONUNPUBLISH', 'Unpublish'), 'delete')
->setDescription(_t(__CLASS__.'.BUTTONUNPUBLISHDESC', 'Remove this page from the published site'))