From 1074a8d916b3d076651d6d73895bf9c03b54cd95 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 21 Apr 2024 14:36:09 +0200 Subject: [PATCH] fix(views): only allow project admins to manage views Resolves https://community.vikunja.io/t/manage-views-only-for-project-admins/2279 --- frontend/src/i18n/lang/en.json | 3 +- frontend/src/views/project/settings/views.vue | 29 +++++++++++++++++-- pkg/models/project_view_rights.go | 6 ++-- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/frontend/src/i18n/lang/en.json b/frontend/src/i18n/lang/en.json index 9d39969c0..b1470df4e 100644 --- a/frontend/src/i18n/lang/en.json +++ b/frontend/src/i18n/lang/en.json @@ -396,7 +396,8 @@ "titleRequired": "Please provide a title.", "delete": "Delete this view", "deleteText": "Are you sure you want to remove this view? It will no longer be possible to use it to view tasks in this project. This action won't delete any tasks. This cannot be undone!", - "deleteSuccess": "The view was successfully deleted" + "deleteSuccess": "The view was successfully deleted", + "onlyAdminsCanEdit": "Only project admins can edit views." } }, "filters": { diff --git a/frontend/src/views/project/settings/views.vue b/frontend/src/views/project/settings/views.vue index 7743d3820..7fc55c28c 100644 --- a/frontend/src/views/project/settings/views.vue +++ b/frontend/src/views/project/settings/views.vue @@ -1,6 +1,6 @@