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

Move User model manipulation to RPC endpoint #3993

Open
7 tasks
mathemancer opened this issue Oct 28, 2024 · 4 comments · May be fixed by #4026
Open
7 tasks

Move User model manipulation to RPC endpoint #3993

mathemancer opened this issue Oct 28, 2024 · 4 comments · May be fixed by #4026
Labels
ready Ready for implementation type: enhancement New feature or request work: backend Related to Python, Django, and simple SQL work: frontend Related to frontend code in the mathesar_ui directory
Milestone

Comments

@mathemancer
Copy link
Contributor

mathemancer commented Oct 28, 2024

Problem

One of our few remaining REST endpoints is /api/ui/v0/users/. Keeping that endpoint requires keeping around DRF, and in particular, requires keeping around our DRF error handling machinery. This adds an astonishing amount of complexity and code to our repo.

Proposed solution

We should move Mathesar user-wrangling functionality to RPC functions. The current list of endponts mapped to functions (from the wiki) is:

Endpoint HTTP Method Function
/api/ui/v0/users/{userId}/ DELETE users.delete
/api/ui/v0/users/{userId}/ GET users.get
/api/ui/v0/users/{userId}/ PATCH users.patch
/api/ui/v0/users/{userId}/password_reset/ POST users.password.revoke
/api/ui/v0/users/ GET users.list
/api/ui/v0/users/ POST users.add
/api/ui/v0/users/password_change/ POST users.password.replace_own

Additional context

We elected to forgo moving these endpoints as part of the architectural transition to save time.

@mathemancer mathemancer added type: enhancement New feature or request needs: triage This issue has not yet been reviewed by a maintainer work: backend Related to Python, Django, and simple SQL work: frontend Related to frontend code in the mathesar_ui directory ready Ready for implementation and removed needs: triage This issue has not yet been reviewed by a maintainer labels Oct 28, 2024
@mathemancer mathemancer added this to the Backlog milestone Oct 28, 2024
@nilaygit-10721
Copy link

can you assign me this issue?

@mathemancer
Copy link
Contributor Author

Hey @nilaygit-10721, this issue isn't quite ready for community contribution yet. I need to split it into a number of sub-tasks.

However, once I do that, you are welcome to try to solve one of the sub-tasks and submit a PR. We'll assign the issue for the sub-task you choose to you once you submit the PR, so no one else works on it while we're reviewing your work.

Thank you!

@nilaygit-10721
Copy link

okay @mathemancer thank you let me know when i can do that

@mathemancer
Copy link
Contributor Author

@nilaygit-10721 Okay, I've specced out some issues.

Please submit PRs for each individual linked issue, and wait for the first to be reviewed before proceeding to the next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Ready for implementation type: enhancement New feature or request work: backend Related to Python, Django, and simple SQL work: frontend Related to frontend code in the mathesar_ui directory
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants