chore: Do not show the user actions if the user doesn't have the necessary permissions in the channel
This commit is contained in:
parent
055d8e8322
commit
bf90d1bbc0
|
@ -924,6 +924,7 @@ Loader {
|
||||||
},
|
},
|
||||||
Loader {
|
Loader {
|
||||||
active: !root.isInPinnedPopup && delegate.hovered && !delegate.hideQuickActions
|
active: !root.isInPinnedPopup && delegate.hovered && !delegate.hideQuickActions
|
||||||
|
&& root.rootStore.permissionsStore.viewAndPostCriteriaMet
|
||||||
visible: active
|
visible: active
|
||||||
sourceComponent: StatusFlatRoundButton {
|
sourceComponent: StatusFlatRoundButton {
|
||||||
objectName: "replyToMessageButton"
|
objectName: "replyToMessageButton"
|
||||||
|
@ -939,6 +940,7 @@ Loader {
|
||||||
},
|
},
|
||||||
Loader {
|
Loader {
|
||||||
active: !root.isInPinnedPopup && root.isText && !root.editModeOn && root.amISender && delegate.hovered && !delegate.hideQuickActions
|
active: !root.isInPinnedPopup && root.isText && !root.editModeOn && root.amISender && delegate.hovered && !delegate.hideQuickActions
|
||||||
|
&& root.rootStore.permissionsStore.viewAndPostCriteriaMet
|
||||||
visible: active
|
visible: active
|
||||||
sourceComponent: StatusFlatRoundButton {
|
sourceComponent: StatusFlatRoundButton {
|
||||||
objectName: "editMessageButton"
|
objectName: "editMessageButton"
|
||||||
|
@ -963,6 +965,9 @@ Loader {
|
||||||
if(delegate.hideQuickActions)
|
if(delegate.hideQuickActions)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (!root.rootStore.permissionsStore.viewAndPostCriteriaMet)
|
||||||
|
return false;
|
||||||
|
|
||||||
const chatType = root.messageStore.chatType;
|
const chatType = root.messageStore.chatType;
|
||||||
const pinMessageAllowedForMembers = root.messageStore.isPinMessageAllowedForMembers
|
const pinMessageAllowedForMembers = root.messageStore.isPinMessageAllowedForMembers
|
||||||
|
|
||||||
|
@ -1025,6 +1030,8 @@ Loader {
|
||||||
return false;
|
return false;
|
||||||
if (delegate.hideQuickActions)
|
if (delegate.hideQuickActions)
|
||||||
return false;
|
return false;
|
||||||
|
if (!root.rootStore.permissionsStore.viewAndPostCriteriaMet)
|
||||||
|
return false;
|
||||||
return (root.amISender || root.amIChatAdmin) &&
|
return (root.amISender || root.amIChatAdmin) &&
|
||||||
(messageContentType === Constants.messageContentType.messageType ||
|
(messageContentType === Constants.messageContentType.messageType ||
|
||||||
messageContentType === Constants.messageContentType.stickerType ||
|
messageContentType === Constants.messageContentType.stickerType ||
|
||||||
|
|
Loading…
Reference in New Issue