-
Notifications
You must be signed in to change notification settings - Fork 90
feat(backend): tenant support for wallet address (#3114) #3152
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
Merged
koekiebox
merged 77 commits into
2893/multi-tenancy-v1
from
3114/tenanted-wallet-addresses
Jan 26, 2025
Merged
Changes from all commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
2f74c4e
feat(backend): tenant service
njlie 61d45f7
fix: integration tests
njlie d57bcc6
feat: use soft delete
njlie 57a663d
refactor: compare whole object in test
njlie fb3d702
fix: better gql errors in tests
njlie e5cc2b5
feat: add idp columns to tenant model
njlie c824c56
feat: pagination tests, push deletedAt to auth api call
njlie 9211ca3
feat: add cache
njlie e2bbc79
fix: update localenv environment variables
njlie fda0653
Merge branch 'refs/heads/nl/3123/backend-tenant-service' into 3114/te…
koekiebox 151c3aa
Merge branch 'refs/heads/main' into 3114/tenanted-wallet-addresses
koekiebox d6257fe
feat(3114): add tenant to wallet address.
koekiebox 86d9a39
feat(3114): test fixes.
koekiebox 3625938
feat: make some tenants fields optional, small refactors
njlie 6f16eaa
Merge branch 'nl/3123/backend-tenant-service' into 3114/tenanted-wall…
koekiebox 490f748
feat(auth): tenants table v1
njlie 10bc6ab
feat(backend): tenant service
njlie d5cc314
feat: use soft delete
njlie fc01ef7
feat: add idp columns to tenant model
njlie 87213de
feat: pagination tests, push deletedAt to auth api call
njlie 0a37b3c
feat: add cache
njlie 3805b10
feat(backend): tenant signature validation for admin api
njlie 92fc1ac
fix: rebase errors
njlie 0ad7ccc
Merge branch '2893/multi-tenancy-v1' into 3114/tenanted-wallet-addresses
koekiebox 645e181
feat(3114): update seed.ts
koekiebox cdc2bda
fix: remove admin api secret check from app
njlie c44cd03
fix: always expect tenant id in request
njlie 4e17260
chore: remove some logs
njlie a9f0fff
Merge branch '2893/multi-tenancy-v1' into 3114/tenanted-wallet-addresses
koekiebox 7d562b5
feat(3114): update for auth and resource server.
koekiebox b5a1667
feat(3114): fix asset service.test.ts
koekiebox f29862a
feat(3114): fix tests.
koekiebox 868221c
Merge branch 'nl/2928/multi-tenancy-signatures' into 3114/tenanted-wa…
koekiebox c650b59
Merge branch '2893/multi-tenancy-v1' into 3114/tenanted-wallet-addresses
koekiebox 5477b5a
feat(3114): merged with latest tenant changes.
koekiebox 47d08f1
feat(3114): extract tenant id from tenant context instead of admin in…
koekiebox ab17c20
feat(3114): test case updates, obtain tenant from header.
koekiebox aef9471
feat(3114): fix test cases for wallet address.
koekiebox 6510bed
feat(3114): address review comments.
koekiebox 2558836
feat(3114): rework tenantId to not be mandatory for wallet address se…
koekiebox 86f86e6
feat(3114): rework tenantId to not be mandatory for wallet address se…
koekiebox 78bd769
feat(3114): rework tenantId to not be mandatory for wallet address se…
koekiebox 6defb40
feat(3114): fix tenant service test case.
koekiebox cede83c
feat(3114): fix tenant service test case.
koekiebox c2caf65
feat(3114): fix tenant service test case.
koekiebox ecb6639
Merge branch '2893/multi-tenancy-v1' into 3114/tenanted-wallet-addresses
koekiebox 8dfa1fb
feat(3114): fix tenant service test case.
koekiebox 562d7e3
feat(3114): fix tenant service test case.
koekiebox c1254f4
feat(3114): force 'forTenantId'.
koekiebox e4dfa65
Merge branch '2893/multi-tenancy-v1' into 3114/tenanted-wallet-addresses
koekiebox d4d4899
feat(3114): force 'forTenantId'.
koekiebox 60672ba
feat(3114): force 'forTenantId'.
koekiebox 094271f
feat(3114): enhancements for 'forTenantId'.
koekiebox 6707b04
feat(3114): test case fixes.
koekiebox f824b26
feat(3114): internal server error
koekiebox f041d80
Merge branch '2893/multi-tenancy-v1' into 3114/tenanted-wallet-addresses
koekiebox a3af5ea
feat(3114): test case.
koekiebox c799815
feat(3114): test case.
koekiebox aaf06b6
feat(3114): review feedback.
koekiebox 87f9ae6
feat(3114): review feedback.
koekiebox b028de7
feat(3114): remove tenant on quote.
koekiebox 27c4352
feat(3114): default operator tenant.
koekiebox a3fda78
feat(3114): review feedback.
koekiebox 5e2d5ed
feat(3114): review feedback from Max.
koekiebox eb87954
feat(3114): review feedback from Max.
koekiebox 951a4c7
feat(3114): fixed.
koekiebox 4c60f7b
feat(3114): review feedback.
koekiebox 3278c87
feat(3114): review feedback.
koekiebox 4d13e0f
feat(3114): review feedback. do not force error on graphql middleware.
koekiebox b29636a
feat(3114): fix the integration test.
koekiebox e16cb65
feat(3114): further review comments.
koekiebox e6b44d7
feat(3114): further review comments.
koekiebox 961c249
feat(3114): final round with Max.
koekiebox fa19198
feat(3114): revert.
koekiebox ae157bd
feat(3114): remove unused.
koekiebox e8bc63c
feat(3114): set the correct operator id.
koekiebox b1abe92
Merge branch '2893/multi-tenancy-v1' into 3114/tenanted-wallet-addresses
koekiebox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
packages/backend/migrations/20250117112902_add_tenant_to_wallet_address.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* @param { import("knex").Knex } knex | ||
* @returns { Promise<void> } | ||
*/ | ||
exports.up = function (knex) { | ||
return knex.schema | ||
.alterTable('walletAddresses', (table) => { | ||
table.uuid('tenantId').references('tenants.id').index() | ||
}) | ||
.then(() => { | ||
return knex.raw( | ||
`UPDATE "walletAddresses" SET "tenantId" = (SELECT id from "tenants" LIMIT 1)` | ||
) | ||
}) | ||
.then(() => { | ||
return knex.schema.alterTable('walletAddresses', (table) => { | ||
table.uuid('tenantId').notNullable().alter() | ||
}) | ||
}) | ||
} | ||
|
||
/** | ||
* @param { import("knex").Knex } knex | ||
* @returns { Promise<void> } | ||
*/ | ||
exports.down = function (knex) { | ||
return Promise.all([ | ||
knex.schema.alterTable('walletAddresses', function (table) { | ||
table.dropColumn('tenantId') | ||
}) | ||
]) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 40 additions & 4 deletions
44
packages/backend/src/graphql/generated/graphql.schema.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.