aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/extender.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/engine/lib/extender.php b/engine/lib/extender.php
index 05a86a62e..abf4f087d 100644
--- a/engine/lib/extender.php
+++ b/engine/lib/extender.php
@@ -186,8 +186,13 @@
$extender = $functionname($extender_id);
} else return false;
+ // If the owner is the specified user, great! They can edit.
if ($extender->getOwner() == $user->getGUID()) return true;
+ // If the user can edit the entity this is attached to, great! They can edit.
+ if (can_edit_entity($extender->entity_guid,$user->getGUID())) return true;
+
+ // Trigger plugin hooks
return trigger_plugin_hook('permissions_check',$type,array('entity' => $entity, 'user' => $user),false);
}