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: Private permissions are displayed in community overview screen and permission sheet even when the user doesn't meet the requirements #19606

Closed
ajayesivan opened this issue Apr 11, 2024 · 1 comment · Fixed by #19675
Assignees
Labels
community-permissions https://www.notion.so/The-Four-Guards-64e9c0b6bf2546a6bfc3716bc96dc587

Comments

@ajayesivan
Copy link
Contributor

ajayesivan commented Apr 11, 2024

Private permissions are displayed in the community overview screen and permissions sheet even when the user doesn't hold tokens to meet those requirements.

When the user enables the 'Hide permissions' toggle in permission settings, those permissions should only be displayed to users who meet the requirement. (This toggle is always enabled for Admin, token master & token owner permissions)
Screenshot 2024-04-11 at 13 47 11

Community permission setup

Screenshot 2024-04-11 at 13 53 03

Hidden permission

Screenshot 2024-04-11 at 13 52 54

Actual behavior on mobile

Hidden permissions are always shown to the user.

In the permissions list displayed in the overview screen, the last one (20 STT, 10 DAI) is a private permission.

Expected behavior

Hidden permissions are only displayed when the user meets those permissions.

@ajayesivan ajayesivan added the community-permissions https://www.notion.so/The-Four-Guards-64e9c0b6bf2546a6bfc3716bc96dc587 label Apr 11, 2024
@ajayesivan
Copy link
Contributor Author

The permissions checks are stored under the communities/permissions-check key in db and this is being used to render the UI.

checkPermissionsToJoinCommunity API is used to get this data. At the moment this API returns all permissions(including private ones). We need to either return the visibility state of each permissions(:private true) from the backend or filter out the private permissions from the backend itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-permissions https://www.notion.so/The-Four-Guards-64e9c0b6bf2546a6bfc3716bc96dc587
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant