terminal, chat and files are granted by default; permissions screen simplified
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 <noreply@anthropic.com>
This commit is contained in:
@@ -396,6 +396,22 @@ export const CAPABILITY_BY_KEY = new Map(CAPABILITIES.map((c) => [c.key, c]));
|
||||
*/
|
||||
export const GRANTABLE_CAPABILITIES = CAPABILITIES.filter((c) => c.kind === 'app' || c.kind === 'confined');
|
||||
|
||||
/**
|
||||
* What every role starts with on a fresh install: the three confined capabilities, at `write`.
|
||||
*
|
||||
* These are the baseline the platform is FOR — a terminal, a file browser and chat. An account that can sign
|
||||
* in and reach none of them is not a restricted account, it is a useless one, and making the owner grant them
|
||||
* by hand before anyone can do anything 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 exceptions to remember. So revoking one of these works exactly like
|
||||
* revoking anything else — the row goes, and nothing puts it back.
|
||||
*
|
||||
* `app` capabilities are deliberately NOT here. Those reach data the owner may not intend to share, and each
|
||||
* needs a sidecar installed before it means anything anyway.
|
||||
*/
|
||||
export const DEFAULT_ROLE_CAPABILITIES: string[] = CAPABILITIES.filter((c) => c.kind === 'confined').map((c) => c.key);
|
||||
|
||||
/** Available to every signed-in account without a grant. */
|
||||
export const CORE_CAPABILITIES = CAPABILITIES.filter((c) => c.kind === 'core');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user