Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to configure email verification for registered user #1929

Merged
merged 11 commits into from
Aug 26, 2020

Conversation

azhavoro
Copy link
Contributor

@azhavoro azhavoro commented Jul 23, 2020

Resolve #1730,

THIS PR makes CVAT is ready to configure email verification for registered user with django-allauth app.

Motivation and context

It's important to have ability to verify user emails that can be used to restore password in future.

How has this been tested?

Manually

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

@coveralls
Copy link

coveralls commented Jul 23, 2020

Pull Request Test Coverage Report for Build 7081

  • 16 of 18 (88.89%) changed or added relevant lines in 3 files are covered.
  • 56 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.01%) to 69.735%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cvat/apps/authentication/auth_basic.py 4 5 80.0%
cvat/apps/authentication/urls.py 5 6 83.33%
Files with Coverage Reduction New Missed Lines %
src/user.js 11 52.17%
src/api-implementation.js 13 77.03%
src/api.js 32 55.13%
Totals Coverage Status
Change from base Build 7079: 0.01%
Covered Lines: 11762
Relevant Lines: 16408

💛 - Coveralls

@azhavoro azhavoro changed the title [WIP]Added ability to configure email verification for registered user Added ability to configure email verification for registered user Jul 27, 2020
bsekachev
bsekachev previously approved these changes Jul 30, 2020
@nmanovic
Copy link
Contributor

nmanovic commented Aug 5, 2020

@azhavoro , please resolve conflicts?

@nmanovic
Copy link
Contributor

nmanovic commented Aug 5, 2020

@zhiltsov-max , could you please look and test the PR?

@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Aug 6, 2020

A bit of documentation on this feature wouldn't be extraneous. I have a suspicion, that enabling mandatory verification after a user has registered won't re-send an verification email.

@azhavoro
Copy link
Contributor Author

azhavoro commented Aug 6, 2020

These settings can be used to test this PR (base.py):

# https://github.com/pennersr/django-allauth
ACCOUNT_AUTHENTICATION_METHOD = 'username'
ACCOUNT_CONFIRM_EMAIL_ON_GET = True
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
OLD_PASSWORD_FIELD_ENABLED = True

# Email backend settings for Django
EMAIL_BACKEND='django.core.mail.backends.console.EmailBackend'

Could you please add documentation about the feature into installation.md?

@azhavoro azhavoro changed the title Added ability to configure email verification for registered user [WIP] Added ability to configure email verification for registered user Aug 7, 2020
zhiltsov-max
zhiltsov-max previously approved these changes Aug 7, 2020
@azhavoro azhavoro changed the title [WIP] Added ability to configure email verification for registered user Added ability to configure email verification for registered user Aug 17, 2020
Copy link
Contributor

@nmanovic nmanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -149,7 +149,7 @@ def generate_ssh_keys():
'rest_framework.throttling.AnonRateThrottle',
],
'DEFAULT_THROTTLE_RATES': {
'anon': '100/minute',
'anon': '100/hour',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you revert these changes?

@@ -205,13 +205,13 @@ def generate_ssh_keys():
# Django Auth
DJANGO_AUTH_TYPE = 'BASIC'
DJANGO_AUTH_DEFAULT_GROUPS = []
LOGIN_URL = 'rest_login'
LOGIN_URL = '/auth/login'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Andrey, you have reverted a couple of PRs. It is my change to fix swagger after commit of serverless.

@nmanovic nmanovic merged commit 2510d4d into develop Aug 26, 2020
@bsekachev bsekachev deleted the az/email branch August 27, 2020 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return user id for REST API user register
5 participants