fix(community): disable anyone can be admin or member permissions #19628
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does the PR do
Fixes #19620
status-go PR: status-im/status-go#7254
We enabled users to create "anyone can be admin" or "anyone can join" permissions , which was wrong. The former would be chaotic and makes no sense to support. The latter is just the default of any community without permissions, so it was just cluttering the description.
The solution was to disable the "Community" part of the "is allowed to" popup when "anyone" is active.
I also improved the error and loading handling of the permission creation flow. We can make it async now if we want and we show a better error to the user if something goes wrong. Before, if there was an error, you lost the screen and had to start everything again.
Affected areas
Architecture compliance
My PR is consistent with this document: QML Architecture Guidelines
Screencapture of the functionality
In the video, I show that I disabled selecting "become admin" and "become member" if "Anyone" is activated. It's technically still possible to send the "anyone is allowed to become admin/member" permission, but there is an error now. We could just disable sending it, but that's more work that I'm not sure if it's worth?
anyone-is-allowed-perm.webm
Impact on end user
Disables this unexpected behaviour
How to test
Risk
Low