Skip to content

Conversation

@LalitDeore
Copy link
Contributor

No description provided.

docs/API.md Outdated

```bash
curl -XDELETE https://shuffler.io/api/v1/orgs/{org_id} -H "Authorization: Bearer APIKEY"
curl -XDELETE https://shuffler.io/api/v1/orgs/{parent_org_id} -H "Authorization: Bearer APIKEY"
Copy link
Member

Choose a reason for hiding this comment

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

Wait, this is scary af. Why don't we just send the delete request directly to the suborg ID?

How didn't I catch this lol

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we need to verify whether user who is sending request for suborg deletion is admin in parent org or not.

But we do have check for whether org which is being deleted is suborg or not.

https://github.com/Shuffle/shuffle-shared/blob/e4c2f47d187934f6230076e76ffc82e4d33075c4/shared.go#L28789C5-L28789C11

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@frikky, I have changed the docs. Now Only with suborg id user can delete that suborg

Copy link
Member

@frikky frikky left a comment

Choose a reason for hiding this comment

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

We need to revert this change. Sending delete requests to your parent ID is not at all an option

@frikky frikky merged commit b3a23df into master Jun 24, 2025
1 check failed
@frikky
Copy link
Member

frikky commented Jun 24, 2025

Nice work!

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.

3 participants