Skip to content

Commit

Permalink
fix: It's possible to set message visibility to 'Your network' when e…
Browse files Browse the repository at this point in the history
…xo.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.
  • Loading branch information
mkrout authored and exo-swf committed Nov 22, 2024
1 parent 2032a9b commit c6f06bb
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
<div v-if="audienceTypesDisplay" class="pt-4">
<span class="subtitle-1 text-color"> {{ $t('exoplatform.kudos.visibility.title') }} </span>
<v-radio-group
v-if="postToNetwork"
v-model="audienceChoice"
class="mt-0 mb-7"
mandatory>
Expand Down Expand Up @@ -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
};
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c6f06bb

Please sign in to comment.