Commit b3c8e65e authored by Olga Brani's avatar Olga Brani
Browse files

Merge branch 'devel-0.13' of into devel-0.13

parents 499639b1 9e12138a
......@@ -1020,6 +1020,8 @@ def fix_superusers(sender, **kwargs):
admins = User.objects.filter(is_superuser=True)
for u in admins:
if not u.has_auth_provider('local'):
def user_post_save(sender, instance, created, **kwargs):
......@@ -102,7 +102,12 @@ def login(request, on_failure='im/login.html'):
message = msg + msg_extra
elif not user.can_login_with_auth_provider('local'):
message = _(astakos_messages.NO_LOCAL_AUTH)
# valid user logged in with no auth providers set, add local provider
# and let him log in
if user.auth_providers.count() == 0:
message = _(astakos_messages.NO_LOCAL_AUTH)
if message:
messages.error(request, message)
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