From 2bb8951ce894d10a2abb114f60c49956aa9f91ca Mon Sep 17 00:00:00 2001 From: Mohamed Amine Krout Date: Thu, 21 Nov 2024 13:35:59 +0100 Subject: [PATCH] fix: It's possible to set message visibility to 'Your network' when exo.feature.PostToNetwork.enabled is set to false - EXO-75422 - Meeds-io/meeds#2606 Prior to this change, a user can set set message visibility to 'Your network' when sending a kudo even if the exo.feature.PostToNetwork.enabled is set to false. This commit hide the "Your network" option when the exo.feature.PostToNetwork.enabled is set to false in the Kudos drawer. --- .../src/main/webapp/vue-app/kudos/components/KudosApp.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kudos-webapps/src/main/webapp/vue-app/kudos/components/KudosApp.vue b/kudos-webapps/src/main/webapp/vue-app/kudos/components/KudosApp.vue index dee35342d..f790f08b4 100644 --- a/kudos-webapps/src/main/webapp/vue-app/kudos/components/KudosApp.vue +++ b/kudos-webapps/src/main/webapp/vue-app/kudos/components/KudosApp.vue @@ -90,6 +90,7 @@
{{ $t('exoplatform.kudos.visibility.title') }} @@ -276,7 +277,8 @@ export default { username: eXo.env.portal.userName, spaceId: eXo.env.portal.spaceId, spacePrettyName: eXo.env.portal.spaceName, - audienceChoice: null, + postToNetwork: eXo.env.portal.postToNetworkEnabled, + audienceChoice: eXo.env.portal.postToNetworkEnabled && 'yourNetwork' || 'oneOfYourSpaces', space: null, noReceiverIdentityId: false }; @@ -453,7 +455,7 @@ export default { return this.audienceChoice === 'yourNetwork'; }, spaceSuggesterDisplay() { - return this.postInYourSpacesChoice && !this.audience; + return (this.postToNetwork && this.postInYourSpacesChoice && !this.spaceId) || !this.postToNetwork ; }, audienceAvatarDisplay() { return (this.audience && this.postInYourSpacesChoice) || this.readOnlySpace;