This repository has been archived by the owner on Oct 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opened registrations for all requesters
closes #1023
- Loading branch information
Showing
6 changed files
with
51 additions
and
10 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
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 |
---|---|---|
|
@@ -16,9 +16,9 @@ def has_object_permission(self, request, view, object): | |
|
||
class CanCreateAccount(permissions.BasePermission): | ||
def has_permission(self, request, view): | ||
user_email = request.data.get('email') | ||
users = RegistrationWhitelist.objects.filter(email=user_email).count() | ||
if view.action == 'create' and not (request.user.is_staff or settings.REGISTRATION_ALLOWED) and users == 0: | ||
# user_email = request.data.get('email') | ||
# users = RegistrationWhitelist.objects.filter(email=user_email).count() | ||
if view.action == 'create' and not (request.user.is_staff or settings.REGISTRATION_ALLOWED): | ||
raise PermissionDenied(detail='We are currently in closed beta. ' | ||
'If you\'d like an account, email [email protected] ' | ||
'with a short description of what you\'d like to use Daemo for.') | ||
|
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
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
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
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