From 4ddaaeb9dd3359226d0406f85c58ea219f559e4e Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 22 Jul 2009 09:39:22 -0700 Subject: Duh... when I added user_can, I passed in the user, but still used the groups from the session --- modules/gallery/helpers/access.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/gallery/helpers/access.php b/modules/gallery/helpers/access.php index 224b51e0..65316a8a 100644 --- a/modules/gallery/helpers/access.php +++ b/modules/gallery/helpers/access.php @@ -100,8 +100,8 @@ class access_Core { $resource = $perm_name == "view" ? $item : model_cache::get("access_cache", $item->id, "item_id"); - foreach (user::group_ids() as $id) { - if ($resource->__get("{$perm_name}_$id") === self::ALLOW) { + foreach ($user->groups as $group) { + if ($resource->__get("{$perm_name}_{$group->id}") === self::ALLOW) { return true; } } -- cgit v1.2.3