diff --git a/README.rst b/README.rst index f47f3a3..81b1071 100644 --- a/README.rst +++ b/README.rst @@ -40,6 +40,9 @@ Features (planned) Configuring a development environment ------------------------------------- +Dependencies: +gettext + Run the following commands in order to setup a development environment on a local computer:: make update diff --git a/xorgauth/accounts/oidc_provider_settings.py b/xorgauth/accounts/oidc_provider_settings.py index 81d767a..07c24d1 100644 --- a/xorgauth/accounts/oidc_provider_settings.py +++ b/xorgauth/accounts/oidc_provider_settings.py @@ -27,6 +27,10 @@ class XorgScopeClaims(ScopeClaims): _("X Groups"), _("The list of the X Groups you belong to") ) + info_xorg_groups_perm = ( + _("X Groups Perms"), + _("The list of the X Groups you belong to, suffix with admin if you are an admin") + ) info_xorg_study_years = ( _("Study year"), _("The year of your study at the Ecole polytechnique") @@ -47,6 +51,18 @@ def scope_xorg_groups(self): } return dic + def scope_xorg_groups_perm(self): + groups = [] + for g in self.user.groups.all(): + name = g.group.shortname + groups.append(name) + if g.perms == 'admin': + groups.append(name + '_admin') + dic = { + 'x_groups_perm': groups + } + return dic + def scope_xorg_study_years(self): return { 'study_years': [self.user.study_year],