Skip to content

Commit

Permalink
COR-42 / Missing Adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
Yan Rudenko committed Oct 14, 2021
1 parent 5789dd2 commit 227ccf6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ckan_pages/adapter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from allauth.account.adapter import DefaultAccountAdapter

class NoNewUsersAccountAdapter(DefaultAccountAdapter):

def is_open_for_signup(self, request):
"""
Checks whether or not the site is open for signups.
Next to simply returning True/False you can also intervene the
regular flow by raising an ImmediateHttpResponse
(Comment reproduced from the overridden method.)
"""
return False

0 comments on commit 227ccf6

Please sign in to comment.