aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/entities.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r--engine/lib/entities.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index eba5b8a4d..9d7f98079 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -681,10 +681,10 @@
// TODO Make sure this deletes all metadata/annotations/relationships/etc!!
$guid = (int)$guid;
-
- $access = get_access_list();
-
- return delete_data("DELETE from {$CONFIG->dbprefix}entities where where guid=$guid and (access_id in {$access} or (access_id = 0 and owner_guid = {$_SESSION['id']}))");
+ $entity = get_entity($guid);
+
+ if ($entity->canEdit())
+ return delete_data("DELETE from {$CONFIG->dbprefix}entities where where guid=$guid");
}