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

[Fix] Pin icon should not be visible to non-admin users #520

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

thesynthax
Copy link
Contributor

@thesynthax thesynthax commented Mar 13, 2024

Brief Title

Pin icon should not be visible to non-admin users like in main Rocket.Chat application.
Check #519 and #517 for complete details

Acceptance Criteria fulfillment

  • Pin Icon is now not visible to non-admin users

Fixes #519

Video/Screenshots

ss_146

P.S: This PR is a continuation to from #518 as it requires the correct usage for UserStore.

@Spiral-Memory
Copy link
Collaborator

Spiral-Memory commented Mar 14, 2024

This is not a valid solution because it's not only the admin who can pin messages. The permissions to pin messages will have to be decided by the workspace administrator in Rocket.chat permission settings. Based on that, whoever has the permission to pin messages will be allowed. So first, you have to fetch the permission info, then check if the current person has permission to do so, and only after that can you make this decision. Not only that admins can create custom roles if they have premium, you might skip that for now but the one i mentioned is extremely important to consider. I am attaching a screenshot reference for you:

image

@thesynthax
Copy link
Contributor Author

Thanks a lot for this insight @Spiral-Memory, I will try to create a commit which will fetch the necessary permissions and check through those. Thanks again!

@thesynthax thesynthax marked this pull request as draft March 14, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Pin icon should not be visible to users without pin permissions
2 participants