diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-30 20:25:10 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-30 20:25:10 +0000 |
commit | 4b3f5ecbab46e13201bf06e55dbe5b71ae80a55e (patch) | |
tree | 8bc892b4f8137eb3b61ea0779d658dc85b4b1a6e /engine | |
parent | b60c540bccaeb39704418a3d458427730e06c42d (diff) | |
download | elgg-4b3f5ecbab46e13201bf06e55dbe5b71ae80a55e.tar.gz elgg-4b3f5ecbab46e13201bf06e55dbe5b71ae80a55e.tar.bz2 |
adding ability to override access regardless of whether the entity is saved in the database yet
git-svn-id: http://code.elgg.org/elgg/trunk@7777 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/entities.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 183d6cb5d..ddbdbe9ab 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -1912,8 +1912,8 @@ function can_edit_entity($entity_guid, $user_guid = 0) { $user = get_loggedin_user(); } + $return = false; if ($entity = get_entity($entity_guid)) { - $return = false; // Test user if possible - should default to false unless a plugin hook says otherwise if ($user) { @@ -1932,13 +1932,10 @@ function can_edit_entity($entity_guid, $user_guid = 0) { } } } + } - return elgg_trigger_plugin_hook('permissions_check', $entity->type, + return elgg_trigger_plugin_hook('permissions_check', $entity->type, array('entity' => $entity, 'user' => $user), $return); - - } else { - return false; - } } /** |