Commit a040e1d0 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

astakos: User auth methods handling fix

do not include third party logins of disabled provider modules (modules which
are not set in ASTAKOS_IM_MODULES). This fixes user's provider remove policy
resolution when user has multiple providers assigned but only one is enabled
in ASTAKOS_IM_MODULES setting.
parent e8419a3f
......@@ -349,7 +349,8 @@ class AuthProvider(object):
return self.get_username_msg
def get_user_providers(self):
return self.user.auth_providers.active()
return self.user.auth_providers.active().filter(
module__in=astakos_settings.IM_MODULES)
def get_user_module_providers(self):
return self.user.auth_providers.active().filter(module=self.module)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment