Skip to content

Commit

Permalink
allow email functions for read only shares
Browse files Browse the repository at this point in the history
Signed-off-by: dartcafe <github@dartcafe.de>
  • Loading branch information
dartcafe committed Oct 10, 2023
1 parent 57d017d commit a666346
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
11 changes: 4 additions & 7 deletions src/js/components/Poll/PollHeaderButtons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
</template>
<PollInformation />
</NcPopover>
<ExportPoll v-if="allowPollDownload" />
<ActionToggleSidebar v-if="allowEdit || allowComment" />
<ExportPoll v-if="acl.allowPollDownload" />
<ActionToggleSidebar v-if="acl.allowEdit || acl.allowComment" />
</div>
</template>

Expand Down Expand Up @@ -66,14 +66,11 @@ export default {

computed: {
...mapState({
allowComment: (state) => state.poll.acl.allowComment,
allowEdit: (state) => state.poll.acl.allowEdit,
allowVote: (state) => state.poll.acl.allowVote,
allowPollDownload: (state) => state.poll.acl.allowPollDownload,
acl: (state) => state.poll.acl,
}),

showUserMenu() {
return this.$route.name !== 'publicVote' || this.allowVote
return this.$route.name !== 'publicVote' || this.acl.allowVote || this.acl.allowSubscribe
},
},

Expand Down
4 changes: 2 additions & 2 deletions src/js/components/User/UserMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</template>
{{ t('polls', 'Edit Email Address') }}
</NcActionInput>
<NcActionInput v-if="$route.name === 'publicVote'"
<NcActionInput v-if="$route.name === 'publicVote' && acl.allowVote"
v-bind="userName.inputProps"
:value.sync="userName.inputValue"
@update:value="validateDisplayName"
Expand Down Expand Up @@ -81,7 +81,7 @@
</template>
{{ t('polls', 'Copy list of email addresses to clipboard') }}
</NcActionButton>
<NcActionButton @click="resetVotes()">
<NcActionButton v-if="acl.allowVote" @click="resetVotes()">
<template #icon>
<ResetVotesIcon />
</template>
Expand Down

0 comments on commit a666346

Please sign in to comment.