aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/entities.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-18 19:13:18 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-18 19:13:18 +0000
commit4549c978b84c61c78d2d5001ffa59017de2286b6 (patch)
treeb10cce937e820ae5a1626ce25c5f8fe8df396463 /engine/lib/entities.php
parent850f987aceda06ad195accfe0912d6b061bb305c (diff)
downloadelgg-4549c978b84c61c78d2d5001ffa59017de2286b6.tar.gz
elgg-4549c978b84c61c78d2d5001ffa59017de2286b6.tar.bz2
Fix for can_write_to_container
git-svn-id: https://code.elgg.org/elgg/trunk@1481 36083f99-b078-4883-b0ff-0f9b5a30f544
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);