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

Inviting unregistered users by email #6901

Merged
merged 71 commits into from
Oct 16, 2023
Merged

Inviting unregistered users by email #6901

merged 71 commits into from
Oct 16, 2023

Conversation

klakhov
Copy link
Contributor

@klakhov klakhov commented Sep 26, 2023

Motivation and context

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have added a description of my changes into the CHANGELOG file
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
  • I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

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.

cvat/apps/organizations/models.py Show resolved Hide resolved
cvat/settings/base.py Outdated Show resolved Hide resolved
cvat/apps/organizations/views.py Show resolved Hide resolved
cvat/apps/organizations/serializers.py Outdated Show resolved Hide resolved
cvat/apps/organizations/serializers.py Outdated Show resolved Hide resolved
cvat/apps/organizations/views.py Outdated Show resolved Hide resolved
cvat/apps/organizations/serializers.py Outdated Show resolved Hide resolved
@klakhov
Copy link
Contributor Author

klakhov commented Oct 5, 2023

@bsekachev

Is it possible to redirect to login or default tasks page if invitation already accepted? Because now I can open this form many times:

As we discussed on HLD meeting, We shouldn't do initial request to check invitation status, because after form is filled invitation can become invalid(expired, deleted etc...). But it would be nice feature for the future.

After a regular registration user gets authenticated immediately after registration. Here it suggest me to login after. Why is it different?

Maybe we should add it. But currently we consider this form as changing user account info (Like change password, as user account is already created. In password changing logic we redirect user to login form after successful change.)

Probably it is true, but I am asking just in case. If a user was invited by email, after registration the user's email gets verified without additional actions?

Yes, thats true

Maybe we should discuss with somebody, but I believe light blue on orange button is not really contrast: image It is unpleasant to look at the button.

Changed it to white:
image

@bsekachev
Copy link
Member

@klakhov

As we discussed on HLD meeting, We shouldn't do initial request to check invitation status, because after form is filled invitation can become invalid(exired, deleted etc...). But it would be nice feature for the future.

If discussed on HLD, ok.
But IMHO user should now if invitation was expired before filling the form, otherwise UX is worse.

@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Merging #6901 (5b59af8) into develop (e699848) will decrease coverage by 0.21%.
Report is 12 commits behind head on develop.
The diff coverage is 44.93%.

@@             Coverage Diff             @@
##           develop    #6901      +/-   ##
===========================================
- Coverage    82.58%   82.37%   -0.21%     
===========================================
  Files          360      361       +1     
  Lines        38914    39115     +201     
  Branches      3570     3579       +9     
===========================================
+ Hits         32137    32221      +84     
- Misses        6777     6894     +117     
Components Coverage Δ
cvat-ui 77.40% <42.97%> (-0.21%) ⬇️
cvat-server 86.93% <47.16%> (-0.21%) ⬇️

@klakhov klakhov requested a review from nmanovic as a code owner October 9, 2023 06:28
cvat/schema.yml Outdated Show resolved Hide resolved
cvat/schema.yml Outdated Show resolved Hide resolved
cvat/schema.yml Outdated Show resolved Hide resolved
cvat/schema.yml Outdated
type: string
readOnly: true
nullable: true
$ref: '#/components/schemas/BasicInvitation'
Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking more along the lines of leaving this field as it is, and adding a new field with the BasicInvitation type.

BTW I dont think this field was used in any way, because all the previous invitations were auto accepted.

Even if it wasn't used by the UI, it was still exposed. In particular, the SDK will attempt to parse all fields in a response, even if you don't use some of them, so this change will break it.

@nmanovic
Copy link
Contributor

Please let me play a littile bit with the PR. Probably, I have some questions.

@nmanovic nmanovic merged commit 8b0130f into develop Oct 16, 2023
32 checks passed
@bsekachev bsekachev deleted the kl/invite-users branch October 20, 2023 12:32
@cvat-bot cvat-bot bot mentioned this pull request Oct 23, 2023
mikhail-treskin pushed a commit to retailnext/cvat that referenced this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants