aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/notification.php
diff options
context:
space:
mode:
authorkevinjardine <kevinjardine@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-04 13:24:05 +0000
committerkevinjardine <kevinjardine@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-04 13:24:05 +0000
commit05a1a3529da33dc8c80d79ad27de2ea8c9ce68e7 (patch)
tree8dd3d92056fe8d33b9a37b4f8ef9f37e76fe876e /engine/lib/notification.php
parentce8a01574d6f1cc282b96eb4c71aeaf0410dd175 (diff)
downloadelgg-05a1a3529da33dc8c80d79ad27de2ea8c9ce68e7.tar.gz
elgg-05a1a3529da33dc8c80d79ad27de2ea8c9ce68e7.tar.bz2
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
Diffstat (limited to 'engine/lib/notification.php')
-rw-r--r--engine/lib/notification.php11
1 files changed, 1 insertions, 10 deletions
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,