Skip to content

Deleteuser#85

Merged
A-Galicia merged 6 commits into
mainfrom
deleteuser
Jun 3, 2026
Merged

Deleteuser#85
A-Galicia merged 6 commits into
mainfrom
deleteuser

Conversation

@adrian-1-cardona

Copy link
Copy Markdown
Contributor

okay in order to test this before pushing to prod : Run the backend locally and point the frontend at it (temporarily change AZURE_URL to http://localhost:5050, or whatever your backend port is). The DELETE will succeed and clean up. This is the no-deploy way to verify. , the only way this would work is if we push to main since the main has that hardcoded Azure url , it should work but for testing I just ran the backend locally and pointed the frontend to it instead of that Azure url it has

- Add deleteUserAccount helper function to handle cascading deletions
* Delete all groups owned by the user
* Remove user from all groups they're a member of
* Delete the user account itself
- Add DELETE /:userParam endpoint for account deletion
* Verify user can only delete their own account
* Extract user by ID or email using existing getUserFilter logic
* Clear authentication cookie on successful deletion to log out user
* Return appropriate error responses (404 for not found, 403 for unauthorized)
- Import AUTH_COOKIE_NAME and clearAuthCookieOptions from auth config
- Ensures data integrity when users delete their accounts by cleaning up group associations
@adrian-1-cardona

Copy link
Copy Markdown
Contributor Author

I ran a test when I connected it and all tests pass but please feel free to go in and check it out, should work once pushed to main

@A-Galicia A-Galicia merged commit f07d3f9 into main Jun 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants