Skip to content

Commit

Permalink
Merge pull request #11156 from nextcloud/fix/11154/expiration-settings
Browse files Browse the repository at this point in the history
fix(settings): apply correct conditions to expiration settings
  • Loading branch information
Antreesy authored Dec 8, 2023
2 parents 59ba49b + 95e9652 commit 734448a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
</NcAppSettingsSection>

<NcAppSettingsSection id="conversation-settings"
:name="canFullModerate ? t('spreed', 'Moderation') : t('spreed', 'Setup overview')">
<ListableSettings v-if="!isNoteToSelf && !isGuest" :token="token" :can-full-moderate="canFullModerate" />
<LinkShareSettings v-if="!isNoteToSelf" :token="token" :can-full-moderate="canFullModerate" />
<RecordingConsentSettings v-if="!isNoteToSelf && recordingConsentAvailable" :token="token" :can-full-moderate="canFullModerate" />
<ExpirationSettings :token="token" :can-full-moderate="canFullModerate" />
:name="selfIsOwnerOrModerator ? t('spreed', 'Moderation') : t('spreed', 'Setup overview')">
<ListableSettings v-if="!isNoteToSelf && !isGuest" :token="token" :can-moderate="canFullModerate" />
<LinkShareSettings v-if="!isNoteToSelf" :token="token" :can-moderate="canFullModerate" />
<RecordingConsentSettings v-if="!isNoteToSelf && recordingConsentAvailable" :token="token" :can-moderate="selfIsOwnerOrModerator" />
<ExpirationSettings :token="token" :can-moderate="selfIsOwnerOrModerator" />
</NcAppSettingsSection>

<!-- Meeting: lobby and sip -->
Expand Down
4 changes: 2 additions & 2 deletions src/components/ConversationSettings/ExpirationSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{{ t('spreed', 'Chat messages can be expired after a certain time. Note: Files shared in chat will not be deleted for the owner, but will no longer be shared in the conversation.') }}
</div>

<template v-if="canFullModerate">
<template v-if="canModerate">
<label for="moderation_settings_message_expiration" class="app-settings-section__label">
{{ t('spreed', 'Set message expiration') }}
</label>
Expand Down Expand Up @@ -68,7 +68,7 @@ export default {
default: null,
},
canFullModerate: {
canModerate: {
type: Boolean,
default: false,
},
Expand Down
6 changes: 3 additions & 3 deletions src/components/ConversationSettings/LinkShareSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{{ t('spreed', 'Guest access') }}
</h4>

<template v-if="canFullModerate">
<template v-if="canModerate">
<NcCheckboxRadioSwitch :checked="isSharedPublicly"
:disabled="isSaving"
type="switch"
Expand Down Expand Up @@ -77,7 +77,7 @@
</template>
{{ t('spreed', 'Copy conversation link') }}
</NcButton>
<NcButton v-if="isSharedPublicly && canFullModerate"
<NcButton v-if="isSharedPublicly && canModerate"
:disabled="isSendingInvitations"
@click="handleResendInvitations"
@keydown.enter="handleResendInvitations">
Expand Down Expand Up @@ -123,7 +123,7 @@ export default {
default: null,
},
canFullModerate: {
canModerate: {
type: Boolean,
default: true,
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/ConversationSettings/ListableSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
-->

<template>
<div v-if="canFullModerate">
<div v-if="canModerate">
<NcCheckboxRadioSwitch :checked="listable !== LISTABLE.NONE"
:disabled="isListableLoading"
type="switch"
Expand Down Expand Up @@ -66,7 +66,7 @@ export default {
default: null,
},
canFullModerate: {
canModerate: {
type: Boolean,
default: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div v-if="disabled && !loading" class="app-settings-section__hint">
{{ t('spreed', 'Recording consent cannot be changed once a call or breakout session has started.') }}
</div>
<NcCheckboxRadioSwitch v-if="canFullModerate && !isGlobalConsent"
<NcCheckboxRadioSwitch v-if="canModerate && !isGlobalConsent"
type="switch"
:checked.sync="recordingConsentSelected"
:disabled="disabled"
Expand Down Expand Up @@ -66,7 +66,7 @@ export default {
default: null,
},
canFullModerate: {
canModerate: {
type: Boolean,
default: true,
},
Expand Down

0 comments on commit 734448a

Please sign in to comment.