diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-06 14:09:30 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-06 14:09:30 +0000 |
commit | 886b42c9e4ce70dd9e08838084f960c4caef18c4 (patch) | |
tree | 6f4c1a0d33a7bce98298f1d4f55cab65315476a5 /engine/lib/entities.php | |
parent | 520ec9f99132b7411105164bb4f2c7d06850b9cd (diff) | |
download | elgg-886b42c9e4ce70dd9e08838084f960c4caef18c4.tar.gz elgg-886b42c9e4ce70dd9e08838084f960c4caef18c4.tar.bz2 |
Edited container-related permissions.
git-svn-id: https://code.elgg.org/elgg/trunk@1737 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r-- | engine/lib/entities.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 94f3e56e7..0985298f7 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -1632,8 +1632,12 @@ // Test user if possible - should default to false unless a plugin hook says otherwise if (!is_null($user)) { - if ($entity->getOwner() == $user->getGUID()) return true; - if ($entity->type == "user" && $entity->getGUID() == $user->getGUID()) return true; + if ($entity->getOwner() == $user->getGUID()) return true;
+ if ($entity->container_guid == $user->getGUID()) return true; + if ($entity->type == "user" && $entity->getGUID() == $user->getGUID()) return true;
+ if ($container_entity = get_entity($entity->container_guid)) {
+ if ($container_entity->canEdit()) return true;
+ } } return trigger_plugin_hook('permissions_check',$entity->type,array('entity' => $entity, 'user' => $user),false); |