Skip to content

Commit

Permalink
chore: validate last editor
Browse files Browse the repository at this point in the history
  • Loading branch information
jeabakker committed Oct 11, 2022
1 parent 2d4b582 commit e01f017
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/ColdTrick/StaticPages/Permissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public static function objectPermissionsCheck(\Elgg\Hook $hook) {
}

// allowed if you are the last editor
if ($entity->getLastEditor()->guid === $user->guid) {
$last_editor = $entity->getLastEditor();
if ($last_editor instanceof \ElggUser && $last_editor->guid === $user->guid) {
return true;
}

Expand Down

0 comments on commit e01f017

Please sign in to comment.