From b28c758d4a98c9e877fb81f7b88f9c8597de74b6 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 20 Oct 2009 17:21:33 -0700 Subject: Add lookup_group Identity provider API and change the permissions controller to use it to get the group it is modifying --- modules/gallery/libraries/Identity.php | 7 +++++++ modules/gallery/libraries/drivers/Identity.php | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'modules/gallery/libraries') diff --git a/modules/gallery/libraries/Identity.php b/modules/gallery/libraries/Identity.php index 3ef13a6d..1dd5d23b 100644 --- a/modules/gallery/libraries/Identity.php +++ b/modules/gallery/libraries/Identity.php @@ -192,6 +192,13 @@ class Identity_Core { return self::instance()->driver->everybody(); } + /** + * @see Identity_Driver::lookup_group. + */ + static function lookup_group($id) { + return self::instance()->driver->lookup_group($id); + } + /** * @see Identity_Driver::lookup_group_by_name. */ diff --git a/modules/gallery/libraries/drivers/Identity.php b/modules/gallery/libraries/drivers/Identity.php index b77eb6be..5b35d49b 100644 --- a/modules/gallery/libraries/drivers/Identity.php +++ b/modules/gallery/libraries/drivers/Identity.php @@ -97,6 +97,13 @@ interface Identity_Driver { */ public function get_user_list($ids); + /** + * Look up a group by id. + * @param integer id + * @return Group_Definition the user object, or null if the name was invalid. + */ + static function lookup_group($id); + /** * List the groups defined in the Identity Provider */ -- cgit v1.2.3