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

feat(shareBrain): prevent re inviting users with access #1063

Merged
merged 3 commits into from
Aug 30, 2023
Merged

Conversation

mamadoudicko
Copy link
Contributor

No description provided.

@mamadoudicko mamadoudicko temporarily deployed to preview August 30, 2023 12:25 — with GitHub Actions Inactive
@vercel
Copy link

vercel bot commented Aug 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2023 0:55am
quivrapp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2023 0:55am

@github-actions
Copy link
Contributor

github-actions bot commented Aug 30, 2023

Risk Level 2 - /home/runner/work/quivr/quivr/backend/repository/brain_subscription/subscription_invitation_service.py

The create_or_update_subscription_invitation method has been updated to return a boolean value indicating whether the invitation was created or updated. This is a good practice as it provides more information about the operation's result. However, it's important to ensure that all calls to this method are updated to handle the new return type.


Risk Level 3 - /home/runner/work/quivr/quivr/backend/routes/subscription_routes.py

  1. The invite_users_to_brain method has been updated to only send an invitation email if the create_or_update_subscription_invitation method returns True. This is a good practice as it prevents unnecessary emails from being sent. However, it's important to ensure that all calls to this method are updated to handle the new return type.

  2. The invite_users_to_brain method now includes the inviter_email and origin parameters in the resend_invitation_email call. This is a good practice as it provides more information in the invitation email. However, it's important to ensure that these parameters are always provided when calling this method.

Example:

should_send_invitation_email = (
    subscription_service.create_or_update_subscription_invitation(
        subscription
    )
)
if should_send_invitation_email:
    resend_invitation_email(
        subscription,
        inviter_email=current_user.email or \"Quivr\",
        origin=origin,
    )

🔄📧🔍


Powered by Code Review GPT

@gozineb gozineb merged commit ba123fe into main Aug 30, 2023
10 checks passed
StanGirard pushed a commit that referenced this pull request Sep 12, 2023
* fix(shareBrain): prevent access duplication in db

* feat: remove unused function

* fix(linter): update types
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.

None yet

2 participants