fix(project): only show create task cta when the user has permission to write to the project

Resolves https://community.vikunja.io/t/create-a-task-link-in-empty-project-for-read-only-share-links/3127
This commit is contained in:
kolaente
2024-12-19 17:08:44 +01:00
parent 9c5f35a0d8
commit bfb7cf9403

View File

@@ -37,14 +37,13 @@
<Nothing v-if="ctaVisible && tasks.length === 0 && !loading"> <Nothing v-if="ctaVisible && tasks.length === 0 && !loading">
{{ $t('project.list.empty') }} {{ $t('project.list.empty') }}
<ButtonLink <ButtonLink
v-if="project.id > 0" v-if="project.id > 0 && canWrite"
@click="focusNewTaskInput()" @click="focusNewTaskInput()"
> >
{{ $t('project.list.newTaskCta') }} {{ $t('project.list.newTaskCta') }}
</ButtonLink> </ButtonLink>
</Nothing> </Nothing>
<draggable <draggable
v-if="tasks && tasks.length > 0" v-if="tasks && tasks.length > 0"
v-model="tasks" v-model="tasks"