summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/access.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-12-17 21:32:53 -0800
committerBharat Mediratta <bharat@menalto.com>2009-12-17 21:32:53 -0800
commit0736cf203b37534848482e47c3afde9b58d6ce27 (patch)
tree846d748802eefe7cb641ae9a2f24e80a4707e0ee /modules/gallery/helpers/access.php
parent9d19e272d672ffc224dfed2799f8e480ecb583e4 (diff)
In Kohana 2.4, ORM no longer does the find_all() call for us when we
retrieve related ORMs. If we tack a find_all() on the end, it breaks the User_Definition interface so create User_Model::groups() and Groups_Model::users() as glue.
Diffstat (limited to 'modules/gallery/helpers/access.php')
-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 85410085..8ce7e436 100644
--- a/modules/gallery/helpers/access.php
+++ b/modules/gallery/helpers/access.php
@@ -101,7 +101,7 @@ class access_Core {
$resource = $perm_name == "view" ?
$item : model_cache::get("access_cache", $item->id, "item_id");
- foreach ($user->groups->find_all() as $group) {
+ foreach ($user->groups() as $group) {
if ($resource->__get("{$perm_name}_{$group->id}") === self::ALLOW) {
return true;
}