Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ GEOSERVER_CORS_ALLOWED_HEADERS=*

# Users Registration
ACCOUNT_OPEN_SIGNUP=True
ACCOUNT_EMAIL_REQUIRED=True
ACCOUNT_SIGNUP_FIELDS="['email*', 'username*', 'password1*', 'password2*']"
ACCOUNT_APPROVAL_REQUIRED=False
ACCOUNT_CONFIRM_EMAIL_ON_GET=False
ACCOUNT_EMAIL_VERIFICATION=none
ACCOUNT_AUTHENTICATION_METHOD=username_email
ACCOUNT_LOGIN_METHODS="{'email', 'username'}"
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_REGISTERED_MEMBERS_GROUP_NAME=True
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_CONTRIBUTORS=True

Expand Down
4 changes: 2 additions & 2 deletions .env_dev
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ GEOSERVER_CORS_ALLOWED_HEADERS=*

# Users Registration
ACCOUNT_OPEN_SIGNUP=True
ACCOUNT_EMAIL_REQUIRED=True
ACCOUNT_SIGNUP_FIELDS="['email*', 'username*', 'password1*', 'password2*']"
ACCOUNT_APPROVAL_REQUIRED=False
ACCOUNT_CONFIRM_EMAIL_ON_GET=False
ACCOUNT_EMAIL_VERIFICATION=none
ACCOUNT_AUTHENTICATION_METHOD=username_email
ACCOUNT_LOGIN_METHODS="{'email', 'username'}"
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_REGISTERED_MEMBERS_GROUP_NAME=True
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_CONTRIBUTORS=True

Expand Down
4 changes: 2 additions & 2 deletions .env_local
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ GEOSERVER_CORS_ALLOWED_HEADERS=*

# Users Registration
ACCOUNT_OPEN_SIGNUP=True
ACCOUNT_EMAIL_REQUIRED=True
ACCOUNT_SIGNUP_FIELDS="['email*', 'username*', 'password1*', 'password2*']"
ACCOUNT_APPROVAL_REQUIRED=False
ACCOUNT_CONFIRM_EMAIL_ON_GET=False
ACCOUNT_EMAIL_VERIFICATION=none
ACCOUNT_AUTHENTICATION_METHOD=username_email
ACCOUNT_LOGIN_METHODS="{'email', 'username'}"
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_REGISTERED_MEMBERS_GROUP_NAME=True
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_CONTRIBUTORS=True

Expand Down
4 changes: 2 additions & 2 deletions .env_test
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ GEOSERVER_CORS_ALLOWED_HEADERS=*

# Users Registration
ACCOUNT_OPEN_SIGNUP=True
ACCOUNT_EMAIL_REQUIRED=True
ACCOUNT_SIGNUP_FIELDS="['email*', 'username*', 'password1*', 'password2*']"
ACCOUNT_APPROVAL_REQUIRED=False
ACCOUNT_CONFIRM_EMAIL_ON_GET=False
ACCOUNT_EMAIL_VERIFICATION=none
ACCOUNT_AUTHENTICATION_METHOD=username_email
ACCOUNT_LOGIN_METHODS="{'email', 'username'}"
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_REGISTERED_MEMBERS_GROUP_NAME=True
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_CONTRIBUTORS=True

Expand Down
2 changes: 1 addition & 1 deletion geonode/people/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ class GenericOpenIDConnectAdapter(OAuth2Adapter, SocialAccountAdapter):
profile_url = PROFILE_URL
id_token_issuer = ID_TOKEN_ISSUER

def get_provider(self, request=None, provider=None):
def get_provider(self, request=None, provider=None, client_id=None):
"""Looks up a `provider`, supporting subproviders by looking up by
`provider_id`.
"""
Expand Down
2 changes: 1 addition & 1 deletion geonode/people/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def validate(self, data):
raise serializers.ValidationError(detail="username cannot be updated")
email = data.get("email")
# Email is required on post
if request.method in ("POST") and settings.ACCOUNT_EMAIL_REQUIRED and not email:
if request.method in ("POST") and "email*" in settings.ACCOUNT_SIGNUP_FIELDS and not email:
raise serializers.ValidationError(detail="email missing from payload")
# email should be unique
if get_user_model().objects.filter(email=email).exists():
Expand Down
Loading