-
-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(organization): Block profile updates to org-related fields in Mul…
…ti-Member Organization context (#5310) ### 📣 Summary Blocked updates to profile fields related to the organization when the user belongs to a Multi-Member Organization (MMO). Ensured other profile updates remain unaffected. ### 📖 Description This PR fixes an issue where users in a Multi-Member Organization (MMO) could update fields in their profile that are directly related to the organization. Such updates are now blocked to maintain data integrity within MMO contexts. These organization-related fields are synchronized with the `Organization` model to ensure the information remains up-to-date, especially when a user purchases a plan.
- Loading branch information
1 parent
0711df4
commit b5d51b3
Showing
10 changed files
with
205 additions
and
88 deletions.
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
32 changes: 32 additions & 0 deletions
32
kobo/apps/organizations/migrations/0006_add_organization_type_and_website.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,32 @@ | ||
# Generated by Django 4.2.15 on 2024-11-28 19:58 | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('organizations', '0005_add_mmo_override_field_to_organization'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='organization', | ||
name='organization_type', | ||
field=models.CharField( | ||
choices=[ | ||
('non-profit', 'Non-profit organization'), | ||
('government', 'Government institution'), | ||
('educational', 'Educational organization'), | ||
('commercial', 'A commercial/for-profit company'), | ||
('none', 'I am not associated with any organization'), | ||
], | ||
default='none', | ||
max_length=20, | ||
), | ||
), | ||
migrations.AddField( | ||
model_name='organization', | ||
name='website', | ||
field=models.CharField(default='', max_length=255), | ||
), | ||
] |
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.