From 05a1a3529da33dc8c80d79ad27de2ea8c9ce68e7 Mon Sep 17 00:00:00 2001 From: kevinjardine Date: Wed, 4 Mar 2009 13:24:05 +0000 Subject: Changed notification to use has_access_to_entity to move all access control checks to a single mechanism git-svn-id: https://code.elgg.org/elgg/trunk@3070 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/notification.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'engine/lib/notification.php') diff --git a/engine/lib/notification.php b/engine/lib/notification.php index 45f190b9a..de637b492 100644 --- a/engine/lib/notification.php +++ b/engine/lib/notification.php @@ -396,16 +396,7 @@ foreach($interested_users as $user) { if ($user instanceof ElggUser) { - if ((in_array($object->access_id,get_access_list($user->guid)) || - $object->access_id == ACCESS_PUBLIC || - $object->access_id == ACCESS_LOGGED_IN) - && - ($object->access_id != ACCESS_PRIVATE || - ($object->access_id == ACCESS_PRIVATE && - $object->owner_guid == $user->guid) - ) - && $user->guid != $SESSION['user']->guid - && $object instanceof ElggEntity) { + if (($user->guid != $SESSION['user']->guid) && has_access_to_entity($object,$user)) { $methodstring = trigger_plugin_hook('notify:entity:message',$object->getType(),array( 'entity' => $object, -- cgit v1.2.3