Merge pull request #2581 from silverstripe-terraformers/bugfix/unpublish-permission

BUG: Unpublish permission decoupled from publish permission.
This commit is contained in:
Steve Boyd 2020-09-08 14:26:23 +12:00 committed by GitHub
commit bf5e94d2be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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'))