fix permissions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user