forked from ckan/ckan.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yan Rudenko
committed
Oct 14, 2021
1 parent
5789dd2
commit 227ccf6
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |