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.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 97518e886..17a2a6a6a 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -1016,15 +1016,16 @@
if (!$container_guid) return true;
$container = get_entity($container_guid);
-
+
if (($container) && ($user))
{
+
+ // If the user can edit the container, they can also write to it
+ if ($container->canEdit()) return true;
+
// Basics, see if the user is a member of the group.
if ($container instanceof ElggGroup)
if (!$container->isMember($user)) return false;
-
- // If the user can edit the container, they can also write to it
- if ($container->canEdit()) return true;
// See if anyone else has anything to say
return trigger_plugin_hook('container_permissions_check',$entity->type,array('container' => $container, 'user' => $user), false);