summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-07-22 09:39:22 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-07-22 09:39:22 -0700
commit4ddaaeb9dd3359226d0406f85c58ea219f559e4e (patch)
treee3e9d35f44b52b7533ad34afaf4ec4c9cf0ed64e /modules
parentf533aee1cc71e8db739406859ac0cf43dce030ec (diff)
Duh... when I added user_can, I passed in the user, but still used the groups from the session
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/helpers/access.php4
1 files changed, 2 insertions, 2 deletions
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;
}
}