-
Notifications
You must be signed in to change notification settings - Fork 272
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: Multi-tenancy / Add support for multiple tenants #561
Merged
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
c9030a3
feat: multi tenancy basic configuration (#480)
wojcikmat 94f91da
feat: multi tenancy basic tenants management (#483)
wojcikmat a032f68
feat: multi tenancy memberships management (#496)
wojcikmat c4d4653
feat: Add admin panel for multitenancy (#499)
wojcikmat bcb633f
feat: Add tenant invitation notification (#497)
wojcikmat 433bb89
Make all tenants query public (#503)
wojcikmat 0c2c41e
feat: multi tenancy refactor membership type (#506)
wojcikmat 2a6d85b
feat: multi tenancy subscriptions (#509)
wojcikmat 9433ca2
fix: multi tenancy enum type (#511)
wojcikmat 2aebe4a
feat: Add initial multi-tenancy logic to the webapp (#504)
mkleszcz 746360e
feat: Create tenant form (#505)
mkleszcz 1dcb2d2
feat: Make tenant dependent example CRUD demo item model (#512)
wojcikmat bf26a59
feat: Organization settings page and invitation to the tenant (#513)
mkleszcz 88ef08c
feat: allow the user to change membership role (#515)
mskwierczynski 6ed8325
feat: User membership delete feature (#517)
mskwierczynski 96bc8a3
feat: #463 Tenant update feature (#518)
mskwierczynski cb687bb
feat: multi tenancy invitation notifications (#516)
wojcikmat da0e893
fix: Fix invalid URL in tenant invitation email (#521)
mkleszcz 6f1f589
fix: Fix issue with showing invalid active tenant in selector (#520)
mkleszcz cc77d19
feat: Add TenantAuthRoute component and tenant role checks (#522)
mkleszcz 76d4641
Fix tenant related queries and tests for finances app (#524)
wojcikmat f55519c
Fix update and delete for not accepted tenant memberships (#523)
wojcikmat 091183a
Change schema to avoid duplicated types in FE schema (#525)
wojcikmat 676b4c3
feat: multi tenancy subscription plan adjustments (#526)
mskwierczynski 9943c91
feat: Multi-tenancy CRUD adjustments (#535)
mskwierczynski cb0040f
feat: Adjust subscriptions routing (#539)
mkleszcz 8faf88e
feat: multi tenancy - add tenant removal form (#542)
sdrejkarz 0018fe5
feat: multi tenancy delete tenant validation (#543)
wojcikmat 0ab5c17
Merge branch 'master' into feat/multi-tenancy
mkleszcz 365d438
chore: Update webapp-tenants package.json to support pnpm 9+
mkleszcz c0888d5
docs: Multi tenancy feature description (#547)
wojcikmat bfa26b1
fix: Fix type-check errors
mkleszcz b43f3f0
feat: Add API reference docs for webapp-tenants (#548)
mkleszcz b4bc9a5
feat: add multi tenancy notifications (#550)
sdrejkarz 361a728
fix: test coverage of webapp-tenants (#556)
sdrejkarz 48f019b
feat: add additional info in the personal settings' members tab (#558)
sdrejkarz 6127c1c
Merge branch 'refs/heads/master' into feat/multi-tenancy
mkleszcz 9065ca3
Merge branch 'master' into feat/multi-tenancy
mkleszcz c2ca5b3
fix: Coherent organization naming (#562)
mkleszcz 302e04a
fix: copies
sdrejkarz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains 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 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 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 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 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
40 changes: 40 additions & 0 deletions
40
packages/backend/apps/demo/migrations/0003_cruddemoitem_tenant.py
This file contains 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,40 @@ | ||
# Generated by Django 4.2 on 2024-03-26 12:10 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
from apps.multitenancy.constants import TenantType | ||
|
||
|
||
def populate_tenant(apps, schema_editor): | ||
CrudDemoItem = apps.get_model('demo', 'CrudDemoItem') | ||
Tenant = apps.get_model('multitenancy', 'Tenant') | ||
|
||
for item in CrudDemoItem.objects.all(): | ||
if not item.tenant: | ||
default_tenant = Tenant.objects.filter(type=TenantType.DEFAULT, creator=item.created_by).first() | ||
item.tenant = default_tenant | ||
item.save() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
('multitenancy', '0005_tenant_billing_email'), | ||
('demo', '0002_initial') | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='cruddemoitem', | ||
name='tenant', | ||
field=models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name='%(class)s_set', | ||
to='multitenancy.tenant', | ||
verbose_name='Tenant', | ||
), | ||
), | ||
migrations.RunPython(populate_tenant, reverse_code=migrations.RunPython.noop), | ||
] |
This file contains 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 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 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 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 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this update on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm... Interesting. I think it should go with the newer version