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

Add API endpoint to delete org #1448

Merged
merged 6 commits into from
Jul 3, 2024
Merged

Add API endpoint to delete org #1448

merged 6 commits into from
Jul 3, 2024

Conversation

tw4l
Copy link
Contributor

@tw4l tw4l commented Dec 13, 2023

Fixes #903

Adds superuser-only API endpoint to delete an org and all of its data

@tw4l tw4l changed the title Issue 903 delete org Add API endpoint to delete org Dec 13, 2023
@tw4l tw4l force-pushed the issue-890-org-export-import branch from 05d3c4e to 5a412c0 Compare May 6, 2024 18:56
@tw4l tw4l force-pushed the issue-903-delete-org branch 2 times, most recently from 70546a8 to 64c6ad6 Compare May 7, 2024 15:17
@tw4l tw4l marked this pull request as ready for review May 8, 2024 15:16
@tw4l tw4l requested a review from ikreymer May 8, 2024 15:16
@tw4l
Copy link
Contributor Author

tw4l commented May 8, 2024

Dependent on #1394

@tw4l tw4l force-pushed the issue-890-org-export-import branch 3 times, most recently from 4d5d002 to 45909cc Compare June 18, 2024 21:51
@tw4l tw4l force-pushed the issue-890-org-export-import branch from d6ab28a to 618b9c0 Compare July 1, 2024 21:46
@tw4l tw4l marked this pull request as draft July 2, 2024 00:38
Base automatically changed from issue-890-org-export-import to main July 2, 2024 21:14
@tw4l tw4l marked this pull request as ready for review July 2, 2024 21:23
Copy link
Member

@ikreymer ikreymer left a comment

Choose a reason for hiding this comment

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

For all of the to_list() calls, we should probably use a while loop as shown here: https://motor.readthedocs.io/en/stable/api-asyncio/cursors.html#motor.motor_asyncio.AsyncIOMotorCursor.to_list which allows for iterating in N results, otherwise looks good!

backend/btrixcloud/orgs.py Outdated Show resolved Hide resolved
Also deletes users if they only belong to this org.
@tw4l
Copy link
Contributor Author

tw4l commented Jul 3, 2024

@ikreymer Latest change re: replicas tested and working as expected, thanks for that!

@tw4l tw4l merged commit 192737e into main Jul 3, 2024
4 checks passed
@tw4l tw4l deleted the issue-903-delete-org branch July 3, 2024 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add API endpoint to delete organization and its data
2 participants