feat(admin): centralize tool & module settings in Werkzeuge tab with per-tool permissions, DB-backed config, connection tests, and cog-button navigation
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
-- =============================================================================
|
||||
-- Migration 092: Tool Configure Permissions + Nextcloud Feature Group
|
||||
-- =============================================================================
|
||||
|
||||
-- Feature group: nextcloud
|
||||
INSERT INTO feature_groups (id, label, sort_order)
|
||||
VALUES ('nextcloud', 'Nextcloud', 11)
|
||||
ON CONFLICT (id) DO NOTHING;
|
||||
|
||||
-- Configure permissions for wissen, vikunja, nextcloud
|
||||
INSERT INTO permissions (id, feature_group_id, label, description, sort_order) VALUES
|
||||
('wissen:configure', 'wissen', 'Konfigurieren', 'BookStack-Verbindung konfigurieren', 10),
|
||||
('vikunja:configure', 'vikunja', 'Konfigurieren', 'Vikunja-Verbindung konfigurieren', 10),
|
||||
('nextcloud:configure', 'nextcloud', 'Konfigurieren', 'Nextcloud-Verbindung konfigurieren', 1)
|
||||
ON CONFLICT (id) DO NOTHING;
|
||||
|
||||
-- Grant all 3 configure permissions to dashboard_kommando
|
||||
INSERT INTO group_permissions (authentik_group, permission_id) VALUES
|
||||
('dashboard_kommando', 'wissen:configure'),
|
||||
('dashboard_kommando', 'vikunja:configure'),
|
||||
('dashboard_kommando', 'nextcloud:configure')
|
||||
ON CONFLICT DO NOTHING;
|
||||
|
||||
-- Seed default app_settings for tool configs
|
||||
INSERT INTO app_settings (key, value) VALUES
|
||||
('tool_config_bookstack', '{}'::jsonb),
|
||||
('tool_config_vikunja', '{}'::jsonb),
|
||||
('tool_config_nextcloud', '{}'::jsonb)
|
||||
ON CONFLICT (key) DO NOTHING;
|
||||
@@ -0,0 +1,15 @@
|
||||
-- =============================================================================
|
||||
-- Migration 093: Module Configure Permissions (kalender, fahrzeuge)
|
||||
-- =============================================================================
|
||||
|
||||
-- Configure permissions for kalender, fahrzeuge
|
||||
INSERT INTO permissions (id, feature_group_id, label, description, sort_order) VALUES
|
||||
('kalender:configure', 'kalender', 'Konfigurieren', 'Kalender-Kategorien verwalten', 10),
|
||||
('fahrzeuge:configure', 'fahrzeuge', 'Konfigurieren', 'Fahrzeugtypen verwalten', 10)
|
||||
ON CONFLICT (id) DO NOTHING;
|
||||
|
||||
-- Grant both configure permissions to dashboard_kommando
|
||||
INSERT INTO group_permissions (authentik_group, permission_id) VALUES
|
||||
('dashboard_kommando', 'kalender:configure'),
|
||||
('dashboard_kommando', 'fahrzeuge:configure')
|
||||
ON CONFLICT DO NOTHING;
|
||||
Reference in New Issue
Block a user