summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-07-25 23:45:48 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-07-25 23:45:48 -0700
commit809e52d80cbf3beb75b238fddb0da3951fb9a8e7 (patch)
tree39488ef113d539995b4543945107bc1caf2b39e1 /modules/gallery/helpers
parentf8516b55d2f0fcf145bb6c27475d633e8a89ccf8 (diff)
Fix for ticket #452
1) Change access_Core::user_can to return true for all permissions if the owner is the specified user. 2) Change Item_Model::viewable to set the owner_id is the first view_restriction This allowed simplification of the generating the where clause to a single $this->orwhere instead of a where and an orwhere.
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/access.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gallery/helpers/access.php b/modules/gallery/helpers/access.php
index c84527f4..2faa922b 100644
--- a/modules/gallery/helpers/access.php
+++ b/modules/gallery/helpers/access.php
@@ -95,7 +95,7 @@ class access_Core {
return false;
}
- if ($user->admin) {
+ if ($user->admin && $item->owner_id == $user->id) {
return true;
}