Skip to content

LUM-1543: Add whitelisting endpoint#45

Open
shyam-patel-kira wants to merge 5 commits intomainfrom
feat/whitelist
Open

LUM-1543: Add whitelisting endpoint#45
shyam-patel-kira wants to merge 5 commits intomainfrom
feat/whitelist

Conversation

@shyam-patel-kira
Copy link
Copy Markdown
Member

Changelog

Added new whitelist system allowing users to request getting whitelisted

  • Created Whitelist model with user relationship and boolean status flags
  • Added schemas, queries and service layer for whitelist operations
  • Implemented user endpoints (POST/GET /whitelist) for request submission and status checking
  • Added admin endpoints for approval management (GET/PATCH /whitelist/admin/{user_id}/*)
  • User authentication via API key with appropriate permission checks
  • All changes follow existing codebase patterns and include proper error handling
  • Manually tested all endpoints with Postman
  • Added user endpoints to postman

@shyam-patel-kira shyam-patel-kira added the enhancement New feature or request label Mar 5, 2025
@shyam-patel-kira shyam-patel-kira requested a review from vasrap March 5, 2025 23:46
@shyam-patel-kira shyam-patel-kira self-assigned this Mar 5, 2025
@linear
Copy link
Copy Markdown

linear Bot commented Mar 5, 2025

@vasrap
Copy link
Copy Markdown
Member

vasrap commented Mar 27, 2025

So the way this should work is, a whitelist request will be a CP submitting their info (name, email, phone, etc), and a list of addresses (one for each node). And an endpoint to cancel an existing whitelist request. I think that's all that's needed. So the db relationship will be User (1) -> CP (1) -> Addresses (N). If the whitelist request is cancelled, there can be a user_cancelled field in the CP table to set to true, ie don't delete records to retain their info. If they re-request whitelist, we can set that to false, and replace the addresses they provided before with new ones. I don't think we need admin endpoints, we can edit fields in the db manually initually, since we'll have to whitelist them manually in the contract anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants