From 3ece1a01f25270939b3c12f754d555d6ac54d375 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 20 Oct 2009 17:01:19 -0700 Subject: Add a groups api method on the Identity provider and change access_Core::_get_all_groups() to use this to get the defined groups. --- modules/gallery/helpers/access.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'modules/gallery/helpers') diff --git a/modules/gallery/helpers/access.php b/modules/gallery/helpers/access.php index fba161e3..4e7491e3 100644 --- a/modules/gallery/helpers/access.php +++ b/modules/gallery/helpers/access.php @@ -419,10 +419,11 @@ class access_Core { * @return ORM_Iterator */ private static function _get_all_groups() { - // When we build the gallery package, it's possible that the user module is not installed yet. + // When we build the gallery package, it's possible that there is no identity provider installed yet. // This is ok at packaging time, so work around it. - if (module::is_active("user")) { - return ORM::factory("group")->find_all(); + $config = module::get_var("gallery", "identity_provider"); + if (!empty($config)) { + return Identity::groups(); } else { return array(); } -- cgit v1.2.3