EmbeddedChat icon indicating copy to clipboard operation
EmbeddedChat copied to clipboard

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

Open thesynthax opened this issue 11 months ago • 2 comments

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

ss_146

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

thesynthax avatar Mar 13 '24 15:03 thesynthax

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

Spiral-Memory avatar Mar 14 '24 05:03 Spiral-Memory

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 avatar Mar 14 '24 12:03 thesynthax