Skip to content
Snippets Groups Projects
Commit 0717e5af authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

astakos: Respect module specific policies

also disable switch policy of shibboleth and local providers by default.
In the case of local provider it just doesn't make sense. Shibboleth doesn't
allow us to create a url which would force user to login with different
credentials.
parent b8cb7637
No related branches found
No related tags found
No related merge requests found
......@@ -173,6 +173,8 @@ class AuthProvider(object):
setting_key = "%s_POLICY" % policy.upper()
if self.has_setting(setting_key):
self.module_policies[policy] = self.get_setting(setting_key)
else:
self.module_policies[policy] = value
# messages cache
self.message_tpls_compiled = OrderedDict()
......@@ -553,7 +555,8 @@ class LocalAuthProvider(AuthProvider):
}
policies = {
'limit': 1
'limit': 1,
'switch': False
}
@property
......@@ -582,6 +585,10 @@ class ShibbolethAuthProvider(AuthProvider):
login_view = 'astakos.im.views.target.shibboleth.login'
username_key = 'identifier'
policies = {
'switch': False
}
messages = {
'title': _('Academic'),
'login_description': _('If you are a student, professor or researcher'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment