fix(task): don't show assignee edit buttons and input when the user does not have the permission to edit
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2024-01-28 13:30:29 +01:00
parent a579a8e65f
commit b3e2107503
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 8 additions and 2 deletions

View File

@ -12,7 +12,7 @@
:autocomplete-enabled="false"
>
<template #items="{items}">
<assignee-list :assignees="items" :remove="removeAssignee"/>
<assignee-list :assignees="items" :remove="removeAssignee" :disabled="disabled"/>
</template>
<template #searchResult="{option: user}">
<user :avatar-size="24" :show-username="true" :user="user"/>

View File

@ -37,12 +37,17 @@
{{ $t('task.attributes.assignees') }}
</div>
<edit-assignees
:disabled="!canWrite"
v-if="canWrite"
:project-id="task.projectId"
:task-id="task.id"
:ref="e => setFieldRef('assignees', e)"
v-model="task.assignees"
/>
<assignee-list
v-else
:assignees="task.assignees"
class="mt-2"
/>
</div>
<CustomTransition name="flash-background" appear>
<div class="column" v-if="activeFields.priority">
@ -513,6 +518,7 @@ import {useProjectStore} from '@/stores/projects'
import {TASK_REPEAT_MODES} from '@/types/IRepeatMode'
import {useAuthStore} from '@/stores/auth'
import {playPopSound} from '@/helpers/playPop'
import AssigneeList from '@/components/tasks/partials/assigneeList.vue'
const {
taskId,