mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
fixed enable signup parameter for social auth
This commit is contained in:
@@ -20,7 +20,7 @@ class AllAuthCustomAdapter(DefaultAccountAdapter):
|
||||
if 'signup_token' in request.session and InviteLink.objects.filter(valid_until__gte=datetime.datetime.today(), used_by=None, uuid=request.session['signup_token']).exists():
|
||||
signup_token = True
|
||||
|
||||
if request.resolver_match.view_name == 'account_signup' and not settings.ENABLE_SIGNUP and not signup_token:
|
||||
if (request.resolver_match.view_name == 'account_signup' or request.resolver_match.view_name == 'socialaccount_signup') and not settings.ENABLE_SIGNUP and not signup_token:
|
||||
return False
|
||||
else:
|
||||
return super(AllAuthCustomAdapter, self).is_open_for_signup(request)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
<h4>{% trans 'Add a 3rd Party Account' %}</h4>
|
||||
|
||||
<ul class="socialaccount_providers">
|
||||
<ul class="socialaccount_providers list-unstyled">
|
||||
{% include "socialaccount/snippets/provider_list.html" with process="connect" %}
|
||||
</ul>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user