diff --git a/surfsense_backend/app/routes/rbac_routes.py b/surfsense_backend/app/routes/rbac_routes.py index 38ae31269..3b91e456d 100644 --- a/surfsense_backend/app/routes/rbac_routes.py +++ b/surfsense_backend/app/routes/rbac_routes.py @@ -107,6 +107,12 @@ PERMISSION_DESCRIPTIONS = { "settings:view": "View search space settings", "settings:update": "Modify search space settings", "settings:delete": "Delete the entire search space", + # Automations + "automations:create": "Create automations from chat or JSON", + "automations:read": "View automations, their triggers, and run history", + "automations:update": "Edit automations and manage their triggers", + "automations:delete": "Remove automations from the search space", + "automations:execute": "Manually fire automations", # Full access "*": "Full access to all features and settings", } diff --git a/surfsense_web/components/settings/roles-manager.tsx b/surfsense_web/components/settings/roles-manager.tsx index 88595e748..5c034470d 100644 --- a/surfsense_web/components/settings/roles-manager.tsx +++ b/surfsense_web/components/settings/roles-manager.tsx @@ -23,6 +23,7 @@ import { Unplug, Users, Video, + Workflow, } from "lucide-react"; import { useCallback, useEffect, useMemo, useState } from "react"; import { toast } from "sonner"; @@ -126,6 +127,12 @@ const CATEGORY_CONFIG: Record< description: "Generate AI podcasts from content", order: 5, }, + automations: { + label: "Automations", + icon: Workflow, + description: "Scheduled and event-driven agent tasks", + order: 5.5, + }, connectors: { label: "Connectors", icon: Unplug, @@ -200,6 +207,10 @@ const ROLE_PRESETS = { "podcasts:create", "podcasts:read", "podcasts:update", + "automations:create", + "automations:read", + "automations:update", + "automations:execute", "connectors:create", "connectors:read", "connectors:update", @@ -220,6 +231,7 @@ const ROLE_PRESETS = { "comments:read", "llm_configs:read", "podcasts:read", + "automations:read", "connectors:read", "logs:read", "members:view", @@ -240,6 +252,10 @@ const ROLE_PRESETS = { "comments:read", "llm_configs:read", "podcasts:read", + "automations:create", + "automations:read", + "automations:update", + "automations:execute", "connectors:read", "logs:read", "members:view",