Wrong permission check for a content owner

Created on 23 November 2016, about 8 years ago
Updated 27 March 2024, 10 months ago

Hello,

Is a user only have the right [Content type]: publish own node type or [Content type]: unpublish own node type, the 'Publish' or 'Unpublish' button doesn't appear in local tasks.

This is due to the condition to check is the current logged user is the owner of the displayed content, in the PublishContentAccess Class : $this->node->getOwner() == $this->account->id(). The equality between en Object and a single integer return false.

So it should be $this->node->getOwnerId() == $this->account->id().

🐛 Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024