diff options
author | Andy Staudacher <andy.st@gmail.com> | 2009-07-27 11:27:50 -0700 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2009-07-27 11:27:50 -0700 |
commit | e68599f6d7dd2e18beaf48d9ba635ae93670101f (patch) | |
tree | a1876c3005f5abc239d92ce18ea630f4dbf5bf6d /modules/gallery/helpers/access.php | |
parent | d18f31ab218c8d79d97b19079ac0078e6155bc39 (diff) | |
parent | 4edf86f0ebfedbbdfda3daf71ed55a461edf9c6c (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/helpers/access.php')
-rw-r--r-- | modules/gallery/helpers/access.php | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/modules/gallery/helpers/access.php b/modules/gallery/helpers/access.php index fbe0b550..949aea84 100644 --- a/modules/gallery/helpers/access.php +++ b/modules/gallery/helpers/access.php @@ -99,16 +99,8 @@ class access_Core { return true; } - if ($item->owner_id == $user->id && - in_array($perm_name, array("view_full", "edit", "add"))) { - return true; - } - - if ($perm_name == "view") { - $resource = $item->owner_id == $user->id ? $item->parent() : $item; - } else { - $resource = model_cache::get("access_cache", $item->id, "item_id"); - } + $resource = $perm_name == "view" ? + $item : model_cache::get("access_cache", $item->id, "item_id"); foreach ($user->groups as $group) { if ($resource->__get("{$perm_name}_{$group->id}") === self::ALLOW) { return true; |