From 189425628e1bab1af59ef8a01d4d85b8fd8f5cde Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 3 Mar 2008 07:41:09 -0800 Subject: [PATCH] Close a hole where the groups could be undefined. --- fas/fas/jsonfasprovider.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fas/fas/jsonfasprovider.py b/fas/fas/jsonfasprovider.py index 7965885..8b833aa 100644 --- a/fas/fas/jsonfasprovider.py +++ b/fas/fas/jsonfasprovider.py @@ -61,6 +61,9 @@ class JsonFasIdentity(BaseClient): super(JsonFasIdentity, self).__init__(FASURL, debug=debug) if user: self._user = user + self._groups = frozenset( + [g['name'] for g in data['person']['approved_memberships']] + ) self.visit_key = visit_key # It's allowed to use a null value for a visit_key if we know we're # generating an anonymous user. The json interface doesn't handle