Commit 472d5440 authored by Michal Čihař's avatar Michal Čihař

Give user friendly message on disabled registration

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 37623c23
......@@ -28,7 +28,7 @@ import json
from social.pipeline.partial import partial
from social.exceptions import (
AuthForbidden, AuthMissingParameter, AuthAlreadyAssociated
AuthException, AuthMissingParameter, AuthAlreadyAssociated
)
from weblate.accounts.models import send_notification_email, VerifiedEmail
......@@ -122,7 +122,7 @@ def verify_open(strategy, backend, user=None, **kwargs):
'''
if not user and not appsettings.REGISTRATION_OPEN:
raise AuthForbidden(backend)
raise AuthException(backend, _('New registrations are disabled!'))
def verify_username(strategy, backend, user, social, details, **kwargs):
......
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