we can use OPENID_LAUNCHPAD_TEAMS_MAPPING in settings.py
That means:
after every login, the given LP-Teams will be mapped with django groups.
then we can simply check if a user in on loco council with
user.groups.filter(name='loco-council') or something like that.
To use this feature we have to do:
1) add OPENID_LAUNCHPAD_TEAMS_MAPPING =
{'ubuntu-lococouncil':'ubuntu-lococouncil'}
2) add django group 'ubuntu-lococouncil' to groups with the admin interface
3) remove the method from common/launchpad.py is_user_on_loco_council() and
change the code parts where this method is used.
i will create a patch which will solve this problem.
** Changed in: loco-directory
Assignee: (unassigned) => Thomas Bechtold (thomasbechtold)
--
LoCo Council look up is too slow
https://bugs.launchpad.net/bugs/494508
You received this bug notification because you are a member of loco-
directory-dev, which is the registrant for loco-directory.
Status in LoCo Directory: Triaged
Bug description:
loco_directory/common/launchpad.py is_user_on_loco_council() is too slow. Maybe
use .membership_details instead of .members?
_______________________________________________
Mailing list: https://launchpad.net/~loco-directory-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~loco-directory-dev
More help : https://help.launchpad.net/ListHelp