You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In BlogPost.php, the canEdit method immediately returns true if its parent's canEdit method returns true.
if (parent::canEdit($member)) {
returntrue;
}
This happens before any of BlogPost's bespoke checks (e.g. checking $parent->isEditor, $this->isAuthor, etc) which ultimately results in some members being able to edit any blog post even if they're not an author for that post (depending on the permissions checks up the line).
It also means that if the parent says a member should not be able to edit the page, if someone else has listed them as an author they may be able to edit the post anyway.
The text was updated successfully, but these errors were encountered:
which would match what happens in canView and means that if permissions up the line fail then this also fails, but if they pass then we still have to check the requirements for this class itself.
In
BlogPost.php
, thecanEdit
method immediately returns true if its parent'scanEdit
method returns true.This happens before any of BlogPost's bespoke checks (e.g. checking
$parent->isEditor
,$this->isAuthor
, etc) which ultimately results in some members being able to edit any blog post even if they're not an author for that post (depending on the permissions checks up the line).It also means that if the parent says a member should not be able to edit the page, if someone else has listed them as an author they may be able to edit the post anyway.
The text was updated successfully, but these errors were encountered: