aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-12 17:55:37 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-12 17:55:37 +0000
commit89e806b1d5bb8d914dcbf20afd92b43d9fb4a2e3 (patch)
treeb6a30b606dfa903b5dab896474ed06184a84619c
parent54886446ade7be52ed93efc90dbade5f93ce3220 (diff)
downloadelgg-89e806b1d5bb8d914dcbf20afd92b43d9fb4a2e3.tar.gz
elgg-89e806b1d5bb8d914dcbf20afd92b43d9fb4a2e3.tar.bz2
Further access additions for admins.
git-svn-id: https://code.elgg.org/elgg/trunk@1860 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/access.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/engine/lib/access.php b/engine/lib/access.php
index 9882c512f..f24a07cba 100644
--- a/engine/lib/access.php
+++ b/engine/lib/access.php
@@ -123,7 +123,13 @@
$owner = $_SESSION['id'];
if (!$owner) $owner = -1;
- $sql = " ({$table_prefix}access_id in {$access} or ({$table_prefix}access_id = 0 and {$table_prefix}owner_guid = $owner))";
+ if ($owner_entity = get_entity($owner)) {
+ if ($owner_entity instanceof ElggUser)
+ if ($owner_entity->admin)
+ $sql = " (1 = 1) ";
+ }
+ if (empty($sql))
+ $sql = " ({$table_prefix}access_id in {$access} or ({$table_prefix}access_id = 0 and {$table_prefix}owner_guid = $owner))";
//}
//else
// $sql = " 1 ";