fix permissions

This commit is contained in:
Matthias Hochmeister
2026-03-24 17:20:31 +01:00
parent f9f54b7e07
commit e6ddf67d95
3 changed files with 14 additions and 7 deletions

View File

@@ -1,13 +1,15 @@
-- Migration 056: Add issues:widget permission
-- Gated permission for the Issue Quick Add dashboard widget.
-- Granted to all groups that currently have issues:create.
--
-- Adds the widget permission for the Issue Quick Add dashboard widget.
-- dashboard_admin gets it automatically via the permission cache (loadCache
-- populates it with every permission in the system).
-- 1. Insert the new permission
-- 1. Insert the new widget permission
INSERT INTO permissions (id, feature_group_id, label, description, sort_order)
VALUES ('issues:widget', 'issues', 'Widget', 'Issue-Schnelleingabe auf dem Dashboard', 8)
ON CONFLICT (id) DO NOTHING;
-- 2. Grant to every group that already has issues:create
-- 2. Grant issues:widget to every group that already has issues:create
INSERT INTO group_permissions (authentik_group, permission_id)
SELECT authentik_group, 'issues:widget'
FROM group_permissions