Skip to content

Commit c9a19e6

Browse files
committed
wip(cli): the uninstall integration grants and reads the package set by name
Claude-Session: https://claude.ai/code/session_01MZuVPXoYeF1Pa3G4ERmTPz Co-authored-by: Claude <noreply@anthropic.com>
1 parent fc6e8f7 commit c9a19e6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎packages/cli/test/package-install-local-uninstall-cleanups.integration.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,14 +245,14 @@ const recordOf = (a: Answer) => a.body?.data ?? a.body?.record ?? a.body;
245245
interface Grants {
246246
/** `GET /data/sys_permission_set?name=…` — the projection the admin surface grants from. */
247247
sets: Answer;
248-
/** `GET /data/sys_user_permission_set?permission_set_id=…` — the user grant made before the uninstall. */
248+
/** `GET /data/sys_user_permission_set?permission_set=…` — the user grant made before the uninstall, by the set's name (ADR-0131 D4). */
249249
bindings: Answer;
250250
}
251251

252-
async function readGrants(live: LiveStart, token: string, setId: string): Promise<Grants> {
252+
async function readGrants(live: LiveStart, token: string, _setId: string): Promise<Grants> {
253253
return {
254254
sets: await http(live, 'GET', `/api/v1/data/sys_permission_set?name=${PERMISSION_SET}`, token),
255-
bindings: await http(live, 'GET', `/api/v1/data/sys_user_permission_set?permission_set_id=${encodeURIComponent(setId)}`, token),
255+
bindings: await http(live, 'GET', `/api/v1/data/sys_user_permission_set?permission_set=${PERMISSION_SET}`, token),
256256
};
257257
}
258258

@@ -299,7 +299,7 @@ async function grantThenUninstall(live: LiveStart, session: Session, run: Run):
299299
run.setId = setId;
300300
run.granted = await http(live, 'POST', '/api/v1/data/sys_user_permission_set', session.token, {
301301
user_id: session.userId,
302-
permission_set_id: setId,
302+
permission_set: PERMISSION_SET,
303303
});
304304
run.before = await readGrants(live, session.token, setId);
305305
run.objectBefore = await http(live, 'GET', `/api/v1/data/${TASK}`, session.token);

0 commit comments

Comments
 (0)