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

fix(users): Check lineage across entities in invite #6680

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

ThisIsMani
Copy link
Contributor

@ThisIsMani ThisIsMani commented Nov 27, 2024

[## Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Currently in invites we don't check if user exists across entities.
This will be a problem when inviting a user with higher entity from different lineage.
This PR fixes it.
Main PR: #6677

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

Closes #6679

How did you test it?

  1. Invite a user in a specific (org, merchant, profile) combination.
  2. Create a new profile in the same merchant account and switch to it.
  3. Invite the same user as merchant level user. This should be stopped by API.

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@ThisIsMani ThisIsMani added C-bug Category: Bug A-users Area: Users labels Nov 27, 2024
@ThisIsMani ThisIsMani self-assigned this Nov 27, 2024
@ThisIsMani ThisIsMani requested a review from a team as a code owner November 27, 2024 13:23
Copy link

semanticdiff-com bot commented Nov 27, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/core/user.rs  0% smaller

@ThisIsMani ThisIsMani linked an issue Nov 27, 2024 that may be closed by this pull request
@Gnanasundari24 Gnanasundari24 merged commit 888c5bf into hotfix-2024.11.20.0 Nov 27, 2024
28 of 38 checks passed
@Gnanasundari24 Gnanasundari24 deleted the invite-fix-hotfix branch November 27, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-users Area: Users C-bug Category: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(users): Check lineage across entities in invite
4 participants