status-go
status-go copied to clipboard
feat: ensOnly communities
Required for
- https://github.com/status-im/status-desktop/issues/5981
This adds the following fields to the community permissions:
ens_subdomainallows
When creating a permission that involves the community, wakuext_editCommunity should be called. The request sent should contain the attributes if the community requires an user to have an ens name, and if the ens name should belong to a specific subdomain:
{
...
"ensOnly": true,
"ensSubdomain": "stateofus.eth", // optional
...
}
If the permission is related to an specific channel, `wakuext_editCommunityChat` should be used instead. This RPC method currently receives a protobuffer in json form that has an attribute `permissions`. This attribute should be filled with the ens rules for the specific chats that were affected:
```js
{
...
"permissions": {
"ens_only": true,
"ens_subdomain": "stateofus.eth",
"allows": ["MODERATE", "READ_WRITE", "READ"]
}
...
}
To validate if a user can join or not a community, when receiving a request to join, in the UI the admin should be able to see the ens verification status of the user. This is part of the contact information (and it's received also as part of the messages.new signal when the verification is done). The UI should then disable the option for the admin to not let them to join the community.
For handling the READ,READ_WRITE feature, the UI should disable the chat input if the user does not have an ens username, or has one that is not part of a custom subdomain. MODERATE is out of scope
Pull Request Checklist
- [ ] Have you updated the documentation, if impacted (e.g. docs.status.im)?
- [ ] Have you tested changes with mobile?
- [ ] Have you tested changes with desktop?
Jenkins Builds
Click to see older builds (3)
| :grey_question: | Commit | :hash: | Finished (UTC) | Duration | Platform | Result |
|---|---|---|---|---|---|---|
| :x: | 60c53108 | #1 | 2022-06-21 12:24:04 | ~1 min | linux |
:page_facing_up:log |
| :x: | 60c53108 | #1 | 2022-06-21 12:24:30 | ~1 min | ios |
:page_facing_up:log |
| :x: | 60c53108 | #1 | 2022-06-21 12:24:39 | ~1 min | android |
:page_facing_up:log |
| :grey_question: | Commit | :hash: | Finished (UTC) | Duration | Platform | Result |
|---|---|---|---|---|---|---|
| :heavy_check_mark: | a7962979 | #2 | 2022-06-21 14:17:08 | ~2 min | linux |
:package:zip |
| :heavy_check_mark: | a7962979 | #2 | 2022-06-21 14:17:14 | ~2 min | ios |
:package:zip |
| :heavy_check_mark: | a7962979 | #2 | 2022-06-21 14:19:38 | ~5 min | android |
:package:aar |
| :heavy_check_mark: | 3090b7e2 | #3 | 2022-06-21 14:27:15 | ~1 min | linux |
:package:zip |
| :heavy_check_mark: | 3090b7e2 | #3 | 2022-06-21 14:27:33 | ~1 min | ios |
:package:zip |
| :heavy_check_mark: | 3090b7e2 | #3 | 2022-06-21 14:29:20 | ~3 min | android |
:package:aar |
Fixes https://github.com/status-im/status-desktop/issues/4939
Closing as it doesn't fit well with the way community permissions have been implemented.