Conversation
| // If content is in draft state, mainLocationId is yet not set | ||
| if ($contentInfo->mainLocationId !== null) { |
There was a problem hiding this comment.
If this is true, then a dedicated ContentInfo method should probably be introduced.
There was a problem hiding this comment.
@Steveb-p
Okay, so I first thought about adding function like this:
+ public function isInitialDraft(): bool
+ {
+ return $this->status === self::STATUS_DRAFT && $this->currentVersionNo === 1;
+ }
However, then I realized that this is not needed for ContentInfo as existing ContentInfo::isDraft() will do just fine. This method will only return true if Content in question has never been published. Once Content is published, ContentInfo::isDraft() will still return false when you create new drafts for that content.
Fixed in acbb2d8
alongosz
left a comment
There was a problem hiding this comment.
AFAIR this is by-design. There's no purpose to hiding content drafts because content drafts can be read by people with versionread policy, the same as hidden content can be accessed. Are you trying to fix some fatal error or enable hiding drafts? TL;DR;.
yes, it is. If you don't want content to be visible at time of publishing.
@alongosz edited.... |
|
There was a problem hiding this comment.
Doesn't this mean, with this change, that for drafts every user has ability to hide & reveal?
Because we won't be checking permission resolver for drafts.
|
@vidarl please make sure #667 (comment) is addressed, PR is rebased and the CI lits green. |



It is not possible to publish content in hidden state
For QA:
Documentation: