[PR #2017] [CLOSED] feat: implement executor features for read users via config #5412

Closed
opened 2026-04-16 13:37:17 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/2017
Author: @ruodeng
Created: 12/22/2025
Status: ❌ Closed

Base: main ← Head: feature/granular-executor-permissions


📝 Commits (1)

  • 0bd638d feat: implement executor features for read users via config

📊 Changes

8 files changed (+118 additions, -8 deletions)

View changed files

📝 config-raw.json (+10 -0)
📝 frontend/src/components/project/views/ProjectKanban.vue (+3 -1)
📝 frontend/src/stores/config.ts (+4 -0)
📝 frontend/src/views/tasks/TaskDetailView.vue (+28 -5)
📝 pkg/config/config.go (+4 -0)
📝 pkg/models/task_comment_permissions.go (+11 -0)
📝 pkg/models/tasks_permissions.go (+54 -2)
📝 pkg/routes/api/v1/info.go (+4 -0)

📄 Description

Description

This PR refines the "Executor" role permissions by splitting the broad enableexecutorfeatures configuration into two granular flags. This provides administrators with finer control over what "Read-only" users can do within the system.

💡 Motivation

Previously, enableexecutorfeatures bundled several distinct permissions (commenting, editing assigned tasks, and creating tasks). This led to an "all-or-nothing" approach which was often too permissive.

This change allows decoupling these capabilities:

  • Granular Control: Admins can now allow commenting without allowing task editing, or vice-versa.
  • Security & Logic: It removes the implicit ability for "Read" users to create tasks, ensuring task creation is strictly reserved for users with Write permissions or higher, aligning with standard RBAC (Role-Based Access Control) expectations.

🛠 Changes

Backend:

  • Config: Deprecated service.enableexecutorfeatures. Added service.enablereadercomments and service.enableassigneeedit.
  • API: Updated /info endpoint to expose ReaderCommentsEnabled and AssigneeEditEnabled.
  • Models/Permissions:
    • TaskComment.CanCreate: Now toggled by ServiceEnableReaderComments.
    • Task.CanUpdate: Now toggled by ServiceEnableAssigneeEdit.
    • Task.CanCreate: Removed the legacy logic that allowed "Read" users to create tasks.

Frontend:

  • Store: Updated config store to support the new granular flags.
  • Views:
    • TaskDetailView.vue: Updated canComment and canWrite logic to check the new flags and verify if the user is the assignee/creator.
    • UI Cleanup: Reverted broad "write" checks in ProjectList and ProjectKanban to hide creation UI elements (like "Add Task" buttons) from users with only Read access.

⚙️ Configuration

The following settings are now available in config.yml:

service:
  # Allows users with Read access to comment on tasks
  enablereadercomments: true 
  # Allows users with Read access to edit tasks IF they are the assignee or creator
  enableassigneeedit: true

---

<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/2017 **Author:** [@ruodeng](https://github.com/ruodeng) **Created:** 12/22/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/granular-executor-permissions` --- ### 📝 Commits (1) - [`0bd638d`](https://github.com/go-vikunja/vikunja/commit/0bd638d200f38afa2390e9376033b4b46941068f) feat: implement executor features for read users via config ### 📊 Changes **8 files changed** (+118 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `config-raw.json` (+10 -0) 📝 `frontend/src/components/project/views/ProjectKanban.vue` (+3 -1) 📝 `frontend/src/stores/config.ts` (+4 -0) 📝 `frontend/src/views/tasks/TaskDetailView.vue` (+28 -5) 📝 `pkg/config/config.go` (+4 -0) 📝 `pkg/models/task_comment_permissions.go` (+11 -0) 📝 `pkg/models/tasks_permissions.go` (+54 -2) 📝 `pkg/routes/api/v1/info.go` (+4 -0) </details> ### 📄 Description ## Description This PR refines the "Executor" role permissions by splitting the broad `enableexecutorfeatures` configuration into two granular flags. This provides administrators with finer control over what "Read-only" users can do within the system. #### 💡 Motivation Previously, `enableexecutorfeatures` bundled several distinct permissions (commenting, editing assigned tasks, and creating tasks). This led to an "all-or-nothing" approach which was often too permissive. **This change allows decoupling these capabilities:** * **Granular Control:** Admins can now allow commenting without allowing task editing, or vice-versa. * **Security & Logic:** It removes the implicit ability for "Read" users to create tasks, ensuring task creation is strictly reserved for users with **Write** permissions or higher, aligning with standard RBAC (Role-Based Access Control) expectations. #### 🛠 Changes **Backend:** * **Config:** Deprecated `service.enableexecutorfeatures`. Added `service.enablereadercomments` and `service.enableassigneeedit`. * **API:** Updated `/info` endpoint to expose `ReaderCommentsEnabled` and `AssigneeEditEnabled`. * **Models/Permissions:** * `TaskComment.CanCreate`: Now toggled by `ServiceEnableReaderComments`. * `Task.CanUpdate`: Now toggled by `ServiceEnableAssigneeEdit`. * `Task.CanCreate`: Removed the legacy logic that allowed "Read" users to create tasks. **Frontend:** * **Store:** Updated `config` store to support the new granular flags. * **Views:** * `TaskDetailView.vue`: Updated `canComment` and `canWrite` logic to check the new flags and verify if the user is the assignee/creator. * **UI Cleanup:** Reverted broad "write" checks in `ProjectList` and `ProjectKanban` to hide creation UI elements (like "Add Task" buttons) from users with only Read access. #### ⚙️ Configuration The following settings are now available in `config.yml`: ```yaml service: # Allows users with Read access to comment on tasks enablereadercomments: true # Allows users with Read access to edit tasks IF they are the assignee or creator enableassigneeedit: true --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-16 13:37:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#5412