diff --git a/backend/app/rbac/migration.py b/backend/app/rbac/migration.py index c8a0e65..56a3f13 100644 --- a/backend/app/rbac/migration.py +++ b/backend/app/rbac/migration.py @@ -137,12 +137,10 @@ NEW_DEFAULT_ROLES = [ "template:view": True, "storage:view": True, "firewall:view": True, - "network:view": True, "node:view": True, "pool:view": True, "backup:view": True, "backup:create": True, - "ipam:view": True, "user:view": True, "log:view": True, "log:export": True, @@ -172,10 +170,8 @@ NEW_DEFAULT_ROLES = [ "template:view": True, "storage:view": True, "firewall:view": True, - "network:view": True, "node:view": True, "pool:view": True, - "ipam:view": True, # No setting:view — that grants the panel-wide settings page. A # user's own profile lives at /profile and needs no permission. "notification:view": True, @@ -195,10 +191,8 @@ NEW_DEFAULT_ROLES = [ "template:view": True, "storage:view": True, "firewall:view": True, - "network:view": True, "node:view": True, "pool:view": True, - "ipam:view": True, } }, ] @@ -489,7 +483,10 @@ def ensure_default_roles_new_format(conn) -> None: # custom roles do not silently lose access after the split. GRANULAR_BACKFILL = [ # (umbrella permission, [granular permissions implied by it]) - ("server:view", ["firewall:view", "network:view", "node:view", "storage:view"]), + # network:view/manage is deliberately NOT implied by server:view - the + # network topology and node/SDN interface config are admin-only, not part + # of the baseline "can see servers" umbrella. + ("server:view", ["firewall:view", "node:view", "storage:view"]), ("vm:view", ["pool:view", "firewall:view"]), ("server:manage", [ "firewall:view", "firewall:manage", diff --git a/init.sql b/init.sql index 5bc8070..c97324f 100644 --- a/init.sql +++ b/init.sql @@ -507,7 +507,6 @@ INSERT INTO roles (name, display_name, description, permissions, is_system, is_a "template:view": true, "storage:view": true, "backup:view": true, "backup:create": true, - "ipam:view": true, "user:view": true, "log:view": true, "log:export": true, "setting:view": true, @@ -523,7 +522,6 @@ INSERT INTO roles (name, display_name, description, permissions, is_system, is_a "lxc:view": true, "lxc:start": true, "lxc:stop": true, "lxc:restart": true, "lxc:console": true, "template:view": true, "storage:view": true, - "ipam:view": true, "notification:view": true, "notification:manage": true }', TRUE, TRUE), ('demo', 'Demo User', 'Read-only access for demonstration', '{ @@ -532,8 +530,7 @@ INSERT INTO roles (name, display_name, description, permissions, is_system, is_a "vm:view": true, "lxc:view": true, "template:view": true, - "storage:view": true, - "ipam:view": true + "storage:view": true }', TRUE, TRUE) ON CONFLICT (name) DO NOTHING;