@coffre/ui 0.14.5 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{audit-sentence-JgJEwQEC.js → actions-log-DupYCEyV.js} +186 -21
- package/dist/chunks/actions-log-DupYCEyV.js.map +1 -0
- package/dist/chunks/{connected-apps-IJdunsu8.js → connected-apps-CGUQlFMx.js} +5 -5
- package/dist/chunks/{connected-apps-IJdunsu8.js.map → connected-apps-CGUQlFMx.js.map} +1 -1
- package/dist/chunks/{delete-place-dIVoK87I.js → delete-place-CswZ-meh.js} +5 -5
- package/dist/chunks/{delete-place-dIVoK87I.js.map → delete-place-CswZ-meh.js.map} +1 -1
- package/dist/chunks/{directory-BM8yoiJN.js → directory-DrswWQLT.js} +15 -15
- package/dist/chunks/directory-DrswWQLT.js.map +1 -0
- package/dist/chunks/environment-actions-8rL9Cw6X.js +576 -0
- package/dist/chunks/environment-actions-8rL9Cw6X.js.map +1 -0
- package/dist/chunks/{folders-D3A1NGpt.js → folders-A6sbR_PG.js} +3 -3
- package/dist/chunks/{folders-D3A1NGpt.js.map → folders-A6sbR_PG.js.map} +1 -1
- package/dist/chunks/{grants-CjVmOgb2.js → grants-C0cb2oii.js} +8 -8
- package/dist/chunks/grants-C0cb2oii.js.map +1 -0
- package/dist/chunks/{multi-combobox-B0JzP1QN.js → multi-combobox-B3SEv1gq.js} +3 -3
- package/dist/chunks/{multi-combobox-B0JzP1QN.js.map → multi-combobox-B3SEv1gq.js.map} +1 -1
- package/dist/chunks/{offboarding-DbozhPym.js → offboarding-C1jbG_dk.js} +72 -67
- package/dist/chunks/offboarding-C1jbG_dk.js.map +1 -0
- package/dist/chunks/{page-JTORvh-N.js → page-CfhC9Hp1.js} +11 -6
- package/dist/chunks/page-CfhC9Hp1.js.map +1 -0
- package/dist/chunks/{personal-tokens-zWZOzLIC.js → personal-tokens-xC9wulhg.js} +5 -5
- package/dist/chunks/{personal-tokens-zWZOzLIC.js.map → personal-tokens-xC9wulhg.js.map} +1 -1
- package/dist/chunks/{principal-DFBswTBr.js → principal-CI17XK13.js} +2 -2
- package/dist/chunks/{principal-DFBswTBr.js.map → principal-CI17XK13.js.map} +1 -1
- package/dist/chunks/{principal-page-jJ0RVFg8.js → principal-page-CdSeftGD.js} +17 -127
- package/dist/chunks/principal-page-CdSeftGD.js.map +1 -0
- package/dist/chunks/{project-page-BjwEoXfU.js → project-page-CHxjBE97.js} +3 -3
- package/dist/chunks/{project-page-BjwEoXfU.js.map → project-page-CHxjBE97.js.map} +1 -1
- package/dist/chunks/{queries-2jdgTwfZ.js → queries-D1JuimTu.js} +82 -26
- package/dist/chunks/queries-D1JuimTu.js.map +1 -0
- package/dist/chunks/{references-CRT2BsOS.js → references-D5llUGQL.js} +5 -5
- package/dist/chunks/{references-CRT2BsOS.js.map → references-D5llUGQL.js.map} +1 -1
- package/dist/chunks/{role-field-DswIpPqY.js → role-field-CoCv8wse.js} +5 -5
- package/dist/chunks/role-field-CoCv8wse.js.map +1 -0
- package/dist/chunks/{row-state-xtRGFnDc.js → row-state-CYH7kZHl.js} +3 -3
- package/dist/chunks/{row-state-xtRGFnDc.js.map → row-state-CYH7kZHl.js.map} +1 -1
- package/dist/chunks/{theme-Ck45wzWB.js → theme-rF44Wbmm.js} +3 -3
- package/dist/chunks/{theme-Ck45wzWB.js.map → theme-rF44Wbmm.js.map} +1 -1
- package/dist/chunks/{ui-D-blFWfx.js → ui-CGdORVzW.js} +2 -2
- package/dist/chunks/{ui-D-blFWfx.js.map → ui-CGdORVzW.js.map} +1 -1
- package/dist/chunks/{use-action-CXEFFjx5.js → use-action-BxrHTBZw.js} +3 -3
- package/dist/chunks/{use-action-CXEFFjx5.js.map → use-action-BxrHTBZw.js.map} +1 -1
- package/dist/chunks/{use-change-BC4xo02c.js → use-change-BorW2R6C.js} +4 -4
- package/dist/chunks/{use-change-BC4xo02c.js.map → use-change-BorW2R6C.js.map} +1 -1
- package/dist/chunks/{use-roles-DswiNxBk.js → use-roles-BZnJ9Cq0.js} +56 -13
- package/dist/chunks/use-roles-BZnJ9Cq0.js.map +1 -0
- package/dist/chunks/{use-shell-zpjE_MKh.js → use-shell-CPskgi1k.js} +3 -3
- package/dist/chunks/{use-shell-zpjE_MKh.js.map → use-shell-CPskgi1k.js.map} +1 -1
- package/dist/index.d.ts +46 -2
- package/dist/index.js +30 -11
- package/dist/index.js.map +1 -1
- package/dist/pages/account.js +11 -11
- package/dist/pages/account.js.map +1 -1
- package/dist/pages/approval.js +2 -2
- package/dist/pages/audit.js +55 -21
- package/dist/pages/audit.js.map +1 -1
- package/dist/pages/device-login.js +2 -2
- package/dist/pages/environment.js +228 -389
- package/dist/pages/environment.js.map +1 -1
- package/dist/pages/login.js +3 -3
- package/dist/pages/oauth-authorize.js +2 -2
- package/dist/pages/project-access.js +11 -11
- package/dist/pages/project-environments.js +28 -359
- package/dist/pages/project-environments.js.map +1 -1
- package/dist/pages/project-settings.js +8 -8
- package/dist/pages/project.js +3 -3
- package/dist/pages/projects.js +8 -8
- package/dist/pages/service-account.js +11 -10
- package/dist/pages/service-account.js.map +1 -1
- package/dist/pages/service-accounts.js +7 -6
- package/dist/pages/service-accounts.js.map +1 -1
- package/dist/pages/settings.d.ts +6 -1
- package/dist/pages/settings.js +284 -164
- package/dist/pages/settings.js.map +1 -1
- package/dist/pages/unregistered.js +2 -2
- package/dist/pages/user.js +7 -6
- package/dist/pages/user.js.map +1 -1
- package/dist/pages/users.js +7 -6
- package/dist/pages/users.js.map +1 -1
- package/package.json +3 -3
- package/src/components/actions-log.tsx +61 -8
- package/src/components/directory.tsx +5 -5
- package/src/components/environment-actions.tsx +508 -0
- package/src/components/grants.tsx +2 -2
- package/src/components/icons.tsx +2 -0
- package/src/components/offboarding.tsx +7 -0
- package/src/components/page.tsx +3 -2
- package/src/components/principal-page.tsx +1 -1
- package/src/components/protected.tsx +52 -39
- package/src/components/role-editor.tsx +99 -68
- package/src/components/role-field.tsx +1 -1
- package/src/lib/audit-sentences.ts +21 -18
- package/src/lib/queries.ts +85 -21
- package/src/lib/roles.ts +36 -10
- package/src/options.ts +19 -3
- package/src/pages/account.tsx +1 -1
- package/src/pages/audit.tsx +56 -16
- package/src/pages/environment.tsx +227 -352
- package/src/pages/project-environments.tsx +20 -322
- package/src/pages/service-accounts.tsx +1 -1
- package/src/pages/settings.tsx +129 -48
- package/src/pages/users.tsx +1 -1
- package/src/parity.ts +18 -11
- package/src/styles/globals.css +271 -89
- package/dist/chunks/audit-sentence-JgJEwQEC.js.map +0 -1
- package/dist/chunks/directory-BM8yoiJN.js.map +0 -1
- package/dist/chunks/grants-CjVmOgb2.js.map +0 -1
- package/dist/chunks/offboarding-DbozhPym.js.map +0 -1
- package/dist/chunks/page-JTORvh-N.js.map +0 -1
- package/dist/chunks/principal-page-jJ0RVFg8.js.map +0 -1
- package/dist/chunks/protected-y7KVhtHd.js +0 -77
- package/dist/chunks/protected-y7KVhtHd.js.map +0 -1
- package/dist/chunks/queries-2jdgTwfZ.js.map +0 -1
- package/dist/chunks/role-field-DswIpPqY.js.map +0 -1
- package/dist/chunks/use-roles-DswiNxBk.js.map +0 -1
package/src/pages/settings.tsx
CHANGED
|
@@ -5,22 +5,80 @@ import { useSuspenseQuery } from '@tanstack/react-query';
|
|
|
5
5
|
import { Link } from '@tanstack/react-router';
|
|
6
6
|
import { toast } from 'sonner';
|
|
7
7
|
import { useCoffre } from '../lib/coffre';
|
|
8
|
+
import { pageRoute } from '../lib/page-route';
|
|
8
9
|
import { affects, queries } from '../lib/queries';
|
|
9
10
|
import { useAction } from '../lib/use-action';
|
|
10
11
|
import { useShell } from '../lib/use-shell';
|
|
11
12
|
import { Card, Fact, PageHeader } from '../components/page';
|
|
12
13
|
import { ScopeField } from '../components/role-field';
|
|
13
14
|
import { RolesSettings } from '../components/role-editor';
|
|
15
|
+
import { PageTabs } from '../components/tabs';
|
|
14
16
|
import { ErrorLine, Modal, Spinner, Toggletip } from '../components/ui';
|
|
15
|
-
import { Info, Pencil } from '../components/icons';
|
|
17
|
+
import { Info, Key, Pencil, Settings, ShieldCheck } from '../components/icons';
|
|
18
|
+
import type { settings as settingsRoute } from '../options';
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
const Route = pageRoute<typeof settingsRoute>();
|
|
18
21
|
|
|
22
|
+
/**
|
|
23
|
+
* The instance's settings, a tab each: General, the instance and who
|
|
24
|
+
* creates service accounts; Roles, the project roles or the global ones;
|
|
25
|
+
* Keys, for whoever runs the instance. Your own settings are under
|
|
26
|
+
* Account, at the sidebar's foot.
|
|
27
|
+
*/
|
|
19
28
|
export function SettingsPage() {
|
|
29
|
+
const { tab, roles } = Route.useSearch();
|
|
30
|
+
const { capabilities } = useShell();
|
|
31
|
+
// One route, its tab in the search: a link is current only for its own search, but Roles for either of its two.
|
|
32
|
+
const current = { exact: true, includeSearch: true } as const;
|
|
33
|
+
return (
|
|
34
|
+
<>
|
|
35
|
+
<PageHeader title="Settings" />
|
|
36
|
+
<PageTabs label="Settings sections">
|
|
37
|
+
{[
|
|
38
|
+
<Link key="general" to="/settings" search={{}} activeOptions={current}>
|
|
39
|
+
<Settings size={15} />
|
|
40
|
+
General
|
|
41
|
+
</Link>,
|
|
42
|
+
<Link key="roles" to="/settings" search={{ tab: 'roles' }} activeOptions={{ includeSearch: true }}>
|
|
43
|
+
<ShieldCheck size={15} />
|
|
44
|
+
Roles
|
|
45
|
+
</Link>,
|
|
46
|
+
capabilities.runsInstance && (
|
|
47
|
+
<Link key="keys" to="/settings" search={{ tab: 'keys' }} activeOptions={current}>
|
|
48
|
+
<Key size={15} />
|
|
49
|
+
Keys
|
|
50
|
+
</Link>
|
|
51
|
+
),
|
|
52
|
+
]}
|
|
53
|
+
</PageTabs>
|
|
54
|
+
{tab === undefined ? (
|
|
55
|
+
<General />
|
|
56
|
+
) : tab === 'keys' ? (
|
|
57
|
+
<KeysTab />
|
|
58
|
+
) : (
|
|
59
|
+
<RolesSettings
|
|
60
|
+
kind={roles === 'global' ? 'instance-role' : 'role'}
|
|
61
|
+
switcher={
|
|
62
|
+
<nav className="segmented" aria-label="Roles">
|
|
63
|
+
<Link to="/settings" search={{ tab: 'roles' }} activeOptions={current}>
|
|
64
|
+
Project roles
|
|
65
|
+
</Link>
|
|
66
|
+
<Link to="/settings" search={{ tab: 'roles', roles: 'global' }} activeOptions={current}>
|
|
67
|
+
Global roles
|
|
68
|
+
</Link>
|
|
69
|
+
</nav>
|
|
70
|
+
}
|
|
71
|
+
/>
|
|
72
|
+
)}
|
|
73
|
+
</>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** The instance, as its deployment set it up, and who creates service accounts. */
|
|
78
|
+
function General() {
|
|
20
79
|
const { auth, capabilities } = useShell();
|
|
21
80
|
const client = useCoffre();
|
|
22
81
|
const { data: directory } = useSuspenseQuery(queries.directory(client, capabilities.canManageGrants));
|
|
23
|
-
const { data: keys } = useSuspenseQuery(queries.auditKeys(client, capabilities.runsInstance));
|
|
24
82
|
const { data: settings } = useSuspenseQuery(queries.settings(client, capabilities.runsInstance));
|
|
25
83
|
const providers = auth?.signin?.providers.map((provider) => provider.label) ?? [];
|
|
26
84
|
|
|
@@ -30,8 +88,6 @@ export function SettingsPage() {
|
|
|
30
88
|
|
|
31
89
|
return (
|
|
32
90
|
<>
|
|
33
|
-
<PageHeader title="Settings" />
|
|
34
|
-
|
|
35
91
|
<Card
|
|
36
92
|
labelledBy="instance"
|
|
37
93
|
title="Instance"
|
|
@@ -55,35 +111,40 @@ export function SettingsPage() {
|
|
|
55
111
|
</span>
|
|
56
112
|
</Fact>
|
|
57
113
|
{principals !== null && (
|
|
58
|
-
|
|
59
|
-
<
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</Fact>
|
|
70
|
-
</>
|
|
114
|
+
<Fact label="Directory">
|
|
115
|
+
<span>
|
|
116
|
+
<Link to="/users">
|
|
117
|
+
{users} user{users === 1 ? '' : 's'}
|
|
118
|
+
</Link>
|
|
119
|
+
{' · '}
|
|
120
|
+
<Link to="/service-accounts">
|
|
121
|
+
{tokens} service account{tokens === 1 ? '' : 's'}
|
|
122
|
+
</Link>
|
|
123
|
+
</span>
|
|
124
|
+
</Fact>
|
|
71
125
|
)}
|
|
72
126
|
</dl>
|
|
73
127
|
</Card>
|
|
74
|
-
|
|
75
|
-
<RolesSettings />
|
|
76
128
|
{settings?.ok === true && <ServiceSetup scope={settings.serviceAccounts} />}
|
|
77
|
-
{keys?.ok === true && <Keys keys={keys} />}
|
|
78
129
|
</>
|
|
79
130
|
);
|
|
80
131
|
}
|
|
81
132
|
|
|
82
133
|
/**
|
|
83
|
-
* Who
|
|
84
|
-
* holds access, inside this scope, giving one at most what they
|
|
85
|
-
* Narrowed, the rest takes an Admin whose own scope reaches it.
|
|
134
|
+
* Who creates service accounts without running the instance, and where:
|
|
135
|
+
* anyone who holds access, inside this scope, giving one at most what they
|
|
136
|
+
* hold there. Narrowed, the rest takes an Admin whose own scope reaches it.
|
|
86
137
|
*/
|
|
138
|
+
function serviceSetupInWords(scope: Scope): string {
|
|
139
|
+
if (unscoped(scope)) return 'Anyone with access, in every project and environment';
|
|
140
|
+
const { projects, environments } = scope;
|
|
141
|
+
if ((projects !== 'all' && 'only' in projects && projects.only.length === 0) || (environments !== 'all' && 'only' in environments && environments.only.length === 0)) {
|
|
142
|
+
return 'Admins only';
|
|
143
|
+
}
|
|
144
|
+
const where = scopeInWords(scope);
|
|
145
|
+
return `Anyone with access, in ${where.charAt(0).toLowerCase()}${where.slice(1)}; elsewhere, Admins`;
|
|
146
|
+
}
|
|
147
|
+
|
|
87
148
|
function ServiceSetup({ scope }: { scope: Scope }) {
|
|
88
149
|
const client = useCoffre();
|
|
89
150
|
const [open, setOpen] = useState(false);
|
|
@@ -95,27 +156,25 @@ function ServiceSetup({ scope }: { scope: Scope }) {
|
|
|
95
156
|
setError(null);
|
|
96
157
|
};
|
|
97
158
|
return (
|
|
98
|
-
<Card
|
|
99
|
-
labelledBy="service-setup"
|
|
100
|
-
title="Service accounts"
|
|
101
|
-
description="Anyone who holds access sets up service accounts for CI where this lets them: the account, its tokens and its OIDC trust, giving it at most what they hold. Elsewhere, an Admin whose scope reaches it does."
|
|
102
|
-
actions={
|
|
103
|
-
<button className="btn" type="button" onClick={() => setOpen(true)}>
|
|
104
|
-
<Pencil size={14} />
|
|
105
|
-
Edit
|
|
106
|
-
</button>
|
|
107
|
-
}
|
|
108
|
-
>
|
|
159
|
+
<Card labelledBy="service-setup" title="Service accounts">
|
|
109
160
|
<dl className="facts">
|
|
110
|
-
<Fact
|
|
111
|
-
|
|
161
|
+
<Fact
|
|
162
|
+
label="Who creates them"
|
|
163
|
+
action={
|
|
164
|
+
<button className="btn btn-sm" type="button" onClick={() => setOpen(true)} aria-label="Edit who creates service accounts">
|
|
165
|
+
<Pencil size={14} />
|
|
166
|
+
Edit
|
|
167
|
+
</button>
|
|
168
|
+
}
|
|
169
|
+
>
|
|
170
|
+
<span>{serviceSetupInWords(scope)}</span>
|
|
112
171
|
</Fact>
|
|
113
172
|
</dl>
|
|
114
173
|
<Modal
|
|
115
174
|
open={open}
|
|
116
175
|
onOpenChange={(next) => (next ? setOpen(true) : close())}
|
|
117
|
-
title="Who
|
|
118
|
-
description="
|
|
176
|
+
title="Who creates service accounts"
|
|
177
|
+
description="Anyone with access creates service accounts in these projects and environments, giving them at most what they hold there; elsewhere, Admins do. All except prod keeps prod's to Admins."
|
|
119
178
|
>
|
|
120
179
|
<form
|
|
121
180
|
className="form"
|
|
@@ -124,7 +183,7 @@ function ServiceSetup({ scope }: { scope: Scope }) {
|
|
|
124
183
|
run(() => client.settings.set({ serviceAccounts: draft }), {
|
|
125
184
|
affects: affects.settings(),
|
|
126
185
|
onSuccess: () => {
|
|
127
|
-
toast.success('Saved
|
|
186
|
+
toast.success('Saved who creates service accounts');
|
|
128
187
|
setOpen(false);
|
|
129
188
|
setError(null);
|
|
130
189
|
},
|
|
@@ -148,6 +207,29 @@ function ServiceSetup({ scope }: { scope: Scope }) {
|
|
|
148
207
|
);
|
|
149
208
|
}
|
|
150
209
|
|
|
210
|
+
function KeysTab() {
|
|
211
|
+
const { capabilities } = useShell();
|
|
212
|
+
const { data: keys } = useSuspenseQuery(queries.auditKeys(useCoffre(), capabilities.runsInstance));
|
|
213
|
+
if (keys === null) return null;
|
|
214
|
+
return keys.ok ? <Keys keys={keys} /> : <ErrorLine error={`The keys could not be read. ${keys.error}`} />;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/** Where a vault key is kept, in words: the deployment's own, or a key service's. */
|
|
218
|
+
function keptIn(provider: string): string {
|
|
219
|
+
if (provider === 'local') return "kept in the deployment's configuration";
|
|
220
|
+
if (provider === 'aws-kms') return 'kept in AWS KMS';
|
|
221
|
+
return `kept in ${provider}`;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/** A key's identifier by its end, `…3f9a2c`, enough to tell it from another; the whole of it a hover away. */
|
|
225
|
+
function KeyId({ id }: { id: string }) {
|
|
226
|
+
return (
|
|
227
|
+
<span className="mono" title={id}>
|
|
228
|
+
{id.length <= 8 ? id : `…${id.slice(-6)}`}
|
|
229
|
+
</span>
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
|
|
151
233
|
/**
|
|
152
234
|
* What the keys you keep are checked against: no secret, so shown. The keys
|
|
153
235
|
* themselves are checked by `coffre verify keys`, on your machine: a vault
|
|
@@ -163,25 +245,24 @@ function Keys({ keys }: { keys: RouteOutput<'GET /audit/keys'> }) {
|
|
|
163
245
|
description={
|
|
164
246
|
<>
|
|
165
247
|
To check your vault key and app key against these, run <code>coffre verify keys</code>.
|
|
166
|
-
It reads them on your machine and sends neither.
|
|
167
248
|
</>
|
|
168
249
|
}
|
|
169
250
|
>
|
|
170
251
|
<dl className="facts">
|
|
171
|
-
<Fact label="Vault ID">
|
|
172
|
-
<span className="mono">{current.vaultId}</span>
|
|
173
|
-
</Fact>
|
|
174
252
|
<Fact label="Vault key">
|
|
175
253
|
<span>
|
|
176
|
-
|
|
177
|
-
{replaced > 0 && `; ${replaced} earlier vault key${replaced === 1 ? '' : 's'} still checkable`}
|
|
254
|
+
<KeyId id={current.vaultId} /> <span className="muted">· {keptIn(current.provider)}</span>
|
|
178
255
|
</span>
|
|
256
|
+
{replaced > 0 && (
|
|
257
|
+
<span className="muted">
|
|
258
|
+
{replaced} earlier vault key{replaced === 1 ? '' : 's'} still checkable
|
|
259
|
+
</span>
|
|
260
|
+
)}
|
|
179
261
|
</Fact>
|
|
180
262
|
<Fact label="App key">
|
|
181
|
-
<
|
|
263
|
+
<KeyId id={keys.app.keyId} />
|
|
182
264
|
</Fact>
|
|
183
265
|
</dl>
|
|
184
266
|
</Card>
|
|
185
267
|
);
|
|
186
268
|
}
|
|
187
|
-
|
package/src/pages/users.tsx
CHANGED
|
@@ -30,7 +30,7 @@ export function UsersPage() {
|
|
|
30
30
|
principals={users}
|
|
31
31
|
hasRemoved={result.removed.some((principal) => principal.principalType === 'user')}
|
|
32
32
|
/>
|
|
33
|
-
<RemovedList principalType="user" removed={result.removed} />
|
|
33
|
+
<RemovedList principalType="user" removed={result.removed} reads={result.reads} />
|
|
34
34
|
</>
|
|
35
35
|
);
|
|
36
36
|
}
|
package/src/parity.ts
CHANGED
|
@@ -47,17 +47,22 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
|
|
|
47
47
|
],
|
|
48
48
|
},
|
|
49
49
|
'PUT /projects/:project/:environment': {
|
|
50
|
-
ui: [
|
|
50
|
+
ui: [
|
|
51
|
+
{ does: 'a project › Environments › Add environment, empty, inheriting, a copy or references', in: 'components/environment-actions.tsx', call: 'environments.create' },
|
|
52
|
+
{ does: "an environment › ⋯ › Fork…, the same dialog, inheriting from it", in: 'components/environment-actions.tsx', call: 'environments.create' },
|
|
53
|
+
{ does: "an environment › ⋯ › My own dev › Make my own dev", in: 'pages/environment.tsx', call: 'environments.create' },
|
|
54
|
+
],
|
|
51
55
|
},
|
|
52
56
|
'PATCH /projects/:project/:environment': {
|
|
53
57
|
ui: [
|
|
54
|
-
{ does: "an environment's card › ⋯ › Rename
|
|
55
|
-
{ does: "an environment's card › ⋯ › Protect
|
|
58
|
+
{ does: "an environment's card or page › ⋯ › Rename…, Archive…; an archived card › ⋯ › Restore…", in: 'components/environment-actions.tsx', call: 'environments.update' },
|
|
59
|
+
{ does: "an environment's card or page › ⋯ › Protect…; for an Owner of its project Unprotect…", in: 'components/protected.tsx', call: 'environments.protect' },
|
|
56
60
|
],
|
|
57
61
|
},
|
|
58
62
|
'DELETE /projects/:project/:environment': {
|
|
59
63
|
ui: [
|
|
60
64
|
{ does: "an archived environment's card › ⋯ › Delete…, its path typed out", in: 'components/delete-place.tsx', call: 'environments.delete' },
|
|
65
|
+
{ does: 'your own dev, `dev@me`, its card or page › ⋯ › Delete…', in: 'components/environment-actions.tsx', call: 'environments.delete' },
|
|
61
66
|
{ does: 'the same dialog: what deleting would erase and revoke', in: 'lib/queries.ts', call: 'environments.previewDelete' },
|
|
62
67
|
],
|
|
63
68
|
},
|
|
@@ -79,14 +84,14 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
|
|
|
79
84
|
'GET /secrets/:project/:environment': { ui: [{ does: 'an environment: its secrets', in: 'pages/environment.tsx', call: 'secrets.list' }] },
|
|
80
85
|
'PATCH /secrets/:project/:environment': {
|
|
81
86
|
ui: [
|
|
82
|
-
{ does: 'an environment › Add secret, Edit, then Save', in: 'pages/environment.tsx', call: 'secrets.set' },
|
|
87
|
+
{ does: 'an environment › Add secret, Edit, then Save under the table', in: 'pages/environment.tsx', call: 'secrets.set' },
|
|
83
88
|
{ does: 'an environment › Import .env, after its plan', in: 'pages/environment.tsx', call: 'secrets.set' },
|
|
84
89
|
{ does: 'a secret › ⋯ › Who sees it, stricter: at once, its value kept', in: 'pages/environment.tsx', call: 'secrets.set' },
|
|
85
90
|
],
|
|
86
91
|
},
|
|
87
92
|
'PATCH /secrets/:project/:environment/:key': {
|
|
88
93
|
ui: [
|
|
89
|
-
{ does: "a secret › Edit: its name, then Save", in: 'pages/environment.tsx', call: 'secrets.rename' },
|
|
94
|
+
{ does: "a secret › Edit: its name, then Save under the table", in: 'pages/environment.tsx', call: 'secrets.rename' },
|
|
90
95
|
{ does: 'a secret › ⋯ › Archive; an archived one › ⋯ › Restore', in: 'pages/environment.tsx', call: 'secrets.update' },
|
|
91
96
|
{ does: "a fork › an override › ⋯ › Reset to its parent; a reset one › ⋯ › Use its own value again; Undo after either", in: 'lib/changes.ts', call: 'secrets.inherit' },
|
|
92
97
|
],
|
|
@@ -135,7 +140,7 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
|
|
|
135
140
|
ui: [
|
|
136
141
|
{ does: 'Users › Add user; Service accounts › Add service account', in: 'components/directory.tsx', call: 'members.add' },
|
|
137
142
|
{ does: 'a project › Service accounts › Add service account › New service account: made with its grant, in one call', in: 'pages/project-access.tsx', call: 'members.add' },
|
|
138
|
-
{ does: 'a user › ⋯ › Change role', in: 'components/directory.tsx', call: 'members.add' },
|
|
143
|
+
{ does: 'a user › ⋯ › Change global role', in: 'components/directory.tsx', call: 'members.add' },
|
|
139
144
|
],
|
|
140
145
|
},
|
|
141
146
|
'DELETE /members/:member': { ui: [{ does: 'a user or service account › ⋯ › Remove…', in: 'components/directory.tsx', call: 'members.remove' }] },
|
|
@@ -199,9 +204,11 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
|
|
|
199
204
|
],
|
|
200
205
|
},
|
|
201
206
|
'GET /audit/verification': { ui: [{ does: "Audit: the log's seal, verified with every visit", in: 'pages/audit.tsx', call: 'audit.verify' }] },
|
|
207
|
+
'GET /audit/trees': { ui: [{ does: "Audit: 0.15's log, its newest checkpoint and the entries since, verified with every visit", in: 'lib/queries.ts', call: 'audit.verifyTrees' }] },
|
|
208
|
+
'GET /audit/reads': { ui: [{ does: "Audit › Verify whole log: the reads listed, held to the uses 0.15's log sealed", in: 'lib/queries.ts', call: 'audit.verifyReads' }] },
|
|
202
209
|
'GET /roles': {
|
|
203
210
|
ui: [
|
|
204
|
-
{ does: 'Settings › Roles and
|
|
211
|
+
{ does: 'Settings › Roles, project and global; every grant picker, for the roles it offers', in: 'lib/queries.ts', call: 'roles.list' },
|
|
205
212
|
],
|
|
206
213
|
},
|
|
207
214
|
'PUT /roles/:role': {
|
|
@@ -218,18 +225,18 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
|
|
|
218
225
|
},
|
|
219
226
|
'PUT /instance-roles/:role': {
|
|
220
227
|
ui: [
|
|
221
|
-
{ does: 'Settings ›
|
|
228
|
+
{ does: 'Settings › Roles › Global roles › Edit… › Save', in: 'components/role-editor.tsx', call: 'roles.set', args: ['developer', {}, { instance: true }] },
|
|
222
229
|
{ does: 'the same dialog: what saving would do, before it is confirmed', in: 'components/role-editor.tsx', call: 'roles.preview', args: ['developer', {}, { instance: true }] },
|
|
223
230
|
],
|
|
224
231
|
},
|
|
225
232
|
'DELETE /instance-roles/:role': {
|
|
226
233
|
ui: [
|
|
227
|
-
{ does: 'Settings ›
|
|
234
|
+
{ does: 'Settings › Roles › Global roles › Edit… › Reset to default', in: 'components/role-editor.tsx', call: 'roles.reset', args: ['developer', { instance: true }] },
|
|
228
235
|
{ does: 'the same: what it would do, before it is confirmed', in: 'components/role-editor.tsx', call: 'roles.previewReset', args: ['developer', { instance: true }] },
|
|
229
236
|
],
|
|
230
237
|
},
|
|
231
|
-
'GET /settings': { ui: [{ does: 'Settings › Service accounts:
|
|
232
|
-
'PUT /settings': { ui: [{ does: 'Settings › Service accounts › Edit', in: 'pages/settings.tsx', call: 'settings.set' }] },
|
|
238
|
+
'GET /settings': { ui: [{ does: 'Settings › General › Service accounts: who creates them', in: 'pages/settings.tsx', call: 'settings.get' }] },
|
|
239
|
+
'PUT /settings': { ui: [{ does: 'Settings › General › Service accounts › Edit, beside who creates them', in: 'pages/settings.tsx', call: 'settings.set' }] },
|
|
233
240
|
'GET /audit/keys': { ui: [{ does: 'Settings › Keys: what the keys you keep are checked against', in: 'pages/settings.tsx', call: 'audit.keys' }] },
|
|
234
241
|
'POST /audit/loss': { not: "an Owner's acceptance of lost audit entries is rare and irreversible: `coffre audit accept-loss`, never a button" },
|
|
235
242
|
};
|