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(multitenancy): move users and tenants to global schema #4781

Merged
merged 68 commits into from
Jun 5, 2024

Conversation

jagan-jaya
Copy link
Contributor

@jagan-jaya jagan-jaya commented May 27, 2024

Type of Change

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

Description

Users will be global and not tied to a tenant
Login page will be one and not customized. An option to switch tenants will be provided

https://github.com/juspay/hyperswitch-product/issues/50

Additional Changes

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

Motivation and Context

To establish tenancy in our application and start using the default tenant as 'Hyperswitch' and also offer a 'test' tenant in all environments

Users will be global and not tied to a tenant
Login page will be one and not customized. An option to switch tenants will be provided

How did you test it?

  1. Start router and control center and try creating new user account.
  2. Check if the user is getting created and an entry added in public schema for the user
  3. Try sign out from the control center and login again
  4. Login should work as expected

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

jagan-jaya and others added 30 commits April 30, 2024 12:44
Base automatically changed from multitenancy to main June 3, 2024 12:43
@jagan-jaya jagan-jaya changed the title Multitenancy users feat(multitenancy): move users and tenants to global schema Jun 4, 2024
@jagan-jaya jagan-jaya marked this pull request as ready for review June 4, 2024 11:37
@jagan-jaya jagan-jaya requested review from a team as code owners June 4, 2024 11:37
@jagan-jaya jagan-jaya self-assigned this Jun 4, 2024
@jagan-jaya jagan-jaya requested a review from racnan June 4, 2024 11:38
@jagan-jaya jagan-jaya added A-core Area: Core flows A-users Area: Users labels Jun 4, 2024
@jagan-jaya jagan-jaya requested a review from jarnura June 4, 2024 11:44
jarnura
jarnura previously approved these changes Jun 4, 2024
Copy link
Member

@jarnura jarnura left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@racnan racnan left a comment

Choose a reason for hiding this comment

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

You can remove the join query if it wont be used and wont work if used.

@jarnura jarnura enabled auto-merge June 5, 2024 13:00
Copy link
Member

@lsampras lsampras left a comment

Choose a reason for hiding this comment

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

the analytics/reporting changes look good

Copy link
Contributor

@racnan racnan left a comment

Choose a reason for hiding this comment

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

Join query not removed.

@jarnura jarnura added this pull request to the merge queue Jun 5, 2024
@jagan-jaya
Copy link
Contributor Author

jagan-jaya commented Jun 5, 2024

#4781 (review)
Will be fixed in this PR

Merged via the queue into main with commit c5e28f2 Jun 5, 2024
10 checks passed
@jarnura jarnura deleted the multitenancy-users branch June 5, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows A-users Area: Users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants