EmbeddedChat
EmbeddedChat copied to clipboard
[Fix] Pin icon should not be visible to non-admin users
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
- [x] Pin Icon is now not visible to non-admin users
Fixes #519
Video/Screenshots
P.S: This PR is a continuation to from #518 as it requires the correct usage for UserStore.
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:
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!