rework issue system
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
-- Migration 055: Ensure wissen:view and bestellungen:view are seeded for all dashboard groups
|
||||
-- Re-seeds permissions that may be missing due to migration ordering or cascade deletes.
|
||||
-- Uses ON CONFLICT DO NOTHING — safe to run multiple times.
|
||||
|
||||
DO $$
|
||||
DECLARE
|
||||
grp TEXT;
|
||||
BEGIN
|
||||
FOR grp IN
|
||||
SELECT DISTINCT authentik_group FROM group_permissions WHERE authentik_group LIKE 'dashboard_%'
|
||||
LOOP
|
||||
INSERT INTO group_permissions (authentik_group, permission_id)
|
||||
VALUES (grp, 'wissen:view'), (grp, 'wissen:widget_recent'), (grp, 'wissen:widget_search')
|
||||
ON CONFLICT DO NOTHING;
|
||||
|
||||
INSERT INTO group_permissions (authentik_group, permission_id)
|
||||
VALUES (grp, 'bestellungen:view')
|
||||
ON CONFLICT DO NOTHING;
|
||||
END LOOP;
|
||||
END $$;
|
||||
Reference in New Issue
Block a user