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

[Community permissions] Modify JoinCommunity API to accept which addresses the user wants to share with the Owner #11154

Closed
jrainville opened this issue Jun 19, 2023 · 0 comments · Fixed by #11224
Assignees
Labels
Milestone

Comments

@jrainville
Copy link
Member

Description

WIP Design: https://www.figma.com/file/uHwhhUsne96HBhkunsD7Po/WIP-flows?type=design&node-id=8-34089&t=rwfZUnY460xDJdUi-0

Currently, when joining a community, if it doesn't have any permission, we share all of the user's Wallet addresses with the Owner node. If it does have permissions, we share the addresses that fulfill the permissions.

What we now want is to give the user the option to choose which address they want to share.

There is also the choice to just share all addresses, in that case, it uses the same method we have right now.

The new API will pass a list of addresses to the backend, and then to the owner.

One caveat, if the list of addresses does not fulfill the permissions to join, we need to reject the call before sending to the Owner. That means returning an error.

If it does fulfill the permission to join, or if there is no permission to join, then the call is valid and is sent to the Owner and the flow stays the same as before.

Also, if the community has Admin permissions, they do not have to be fulfilled for the call to be valid. For example, if a community requires 10 SNT to join and 1 special collectible to be admin, if the user only has 10 SNT in the shared addresses, that is valid.

Most of the code should be already there, we just need to modify or add a new API endpoint in status-go so that we don't just pass the password, we also pass the list of addresses the user wants to share.

There is no UI work to be done with this task. Mostly status-go, but also a little bit of Nim to modify the functions that will be called from QML. Feel free to use a placeholder UI to test, but status-go tests can suffice.

Acceptance Criteria

  • There is a new or modified API that let's users pass the addresses they want to share with the Owner instead of always passing all addresses
  • It is still possible to pass all addresses
  • If there is a member permission and the list of addresses does not fulfill that permission, the call should error and not send to the Owner
@jrainville jrainville added this to the 0.14 milestone Jun 19, 2023
@jrainville jrainville changed the title [Community permissions] Modifyi JoinCommunity API to accept which addresses the user wants to share with the Owner [Community permissions] Modify JoinCommunity API to accept which addresses the user wants to share with the Owner Jun 20, 2023
@jrainville jrainville self-assigned this Jun 21, 2023
@jrainville jrainville moved this to Iteration Backlog in Status Desktop/Mobile Board Jun 21, 2023
@jrainville jrainville moved this from Iteration Backlog to In Progress in Status Desktop/Mobile Board Jun 21, 2023
@jrainville jrainville moved this from In Progress to Code review in Status Desktop/Mobile Board Jun 22, 2023
@github-project-automation github-project-automation bot moved this from Code review to Done in Status Desktop/Mobile Board Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant