From f0af7237db835452fec7af0eeee890a8a20848f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Tue, 11 Aug 2026 20:25:31 +0000 Subject: [PATCH] terminal, chat and files are granted by default; permissions screen simplified MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DEFAULTS. Every role now starts with the three confined capabilities at write, seeded in bootstrap. These are what the platform is FOR — an account that signs in and reaches none of them is not restricted, it is useless, and making the owner grant them by hand first is a step with no decision in it. Seeded as real rows rather than implied by absence, which keeps the table's one rule intact: a missing row means no access, always, with no exception to remember. Revoking one therefore works like revoking anything else — the row goes and nothing puts it back. Done in bootstrap because that happens exactly once per install, so seeding can never fight a later revocation. Non-fatal: an owner whose roles hold nothing is a one-click fix, while failing bootstrap over it leaves a platform with no account at all. `app` capabilities are deliberately not defaulted — they reach data the owner may not intend to share, and each needs a sidecar before it means anything. SCREEN. Role selection is tabs rather than a dropdown: three roles are the axis you move along, and a select hid two of them behind a click while giving no sense of which one you are editing. Row descriptions are gone — with three rows called Terminal, Chat and Files they explained nothing — and the "needs a Linux account" warning went with them, since every account now gets one at creation, so it was noise about a state that no longer occurs on its own. `needsOsAccount` is removed from the API too, not just hidden. Co-Authored-By: Claude Opus 5 --- .../UserManagement/PermissionsSection.tsx | 52 +++++++++---------- src/servers/api/auth/bootstrap.ts | 20 ++++++- src/servers/api/users/capabilities-routes.ts | 2 - src/servers/capabilities/registry.ts | 16 ++++++ 4 files changed, 60 insertions(+), 30 deletions(-) diff --git a/src/apps/officer-web/Screens/Dashboard/Settings/UserManagement/PermissionsSection.tsx b/src/apps/officer-web/Screens/Dashboard/Settings/UserManagement/PermissionsSection.tsx index 484c5be5..86fbe11b 100644 --- a/src/apps/officer-web/Screens/Dashboard/Settings/UserManagement/PermissionsSection.tsx +++ b/src/apps/officer-web/Screens/Dashboard/Settings/UserManagement/PermissionsSection.tsx @@ -20,8 +20,6 @@ type CapabilityInfo = { description: string; routes: string[]; hasPersonalWrites: boolean; - /** Confined: the grant does nothing until the member has a Linux account on this machine. */ - needsOsAccount: boolean; }; type Grant = { role: string; capability: string; level: 'read' | 'write' }; @@ -101,21 +99,27 @@ export const PermissionsSection = () => { return (
+ {/* Tabs rather than a dropdown. There are three roles and they are the axis you move along — a select + hides two of them behind a click and gives no sense of "which one am I editing" at a glance. Real + buttons, because switching role mutates a draft rather than navigating. */}
-
- Role - +
+ {data.roles.map((r) => ( + + ))}