fix: converge v02 authorization on OpenFGA (#899)

Co-authored-by: Codex Agent <codex@hwlab.local>
This commit is contained in:
Lyon
2026-06-05 11:11:15 +08:00
committed by GitHub
parent 578e429cb9
commit 48e3d24ad6
22 changed files with 420 additions and 277 deletions
+1 -1
View File
@@ -560,7 +560,7 @@ test("configured postgres runtime persists and queries records through query cli
projectId: "prj_01J00000000000000000001000",
gatewaySessionId: "gws_01J00000000000000000001000",
gatewayId: "gtw_01J00000000000000000001000",
serviceId: "hwlab-gateway-simu",
serviceId: "hwlab-gateway",
endpoint: "http://127.0.0.1:7101"
});
await rpc("req_01J00000000000000000001002", "box.resource.register", {
+1 -3
View File
@@ -47,7 +47,6 @@ const postgresCountTables = Object.freeze([
"agent_sessions",
"account_workspaces",
"device_pods",
"device_pod_grants",
"device_leases",
"device_pod_jobs"
]);
@@ -125,7 +124,7 @@ export class CloudRuntimeStore {
const gatewaySession = pruneUndefined({
gatewaySessionId: input.gatewaySessionId || makeId("gws"),
projectId: requireProtocolId(input, "projectId"),
serviceId: input.serviceId || "hwlab-gateway-simu",
serviceId: input.serviceId || "hwlab-gateway",
gatewayId: input.gatewayId || makeId("gtw"),
endpoint: input.endpoint,
status: input.status || "connected",
@@ -1768,7 +1767,6 @@ function toCountKey(table) {
if (table === "agent_sessions") return "agentSessions";
if (table === "account_workspaces") return "accountWorkspaces";
if (table === "device_pods") return "devicePods";
if (table === "device_pod_grants") return "devicePodGrants";
if (table === "device_leases") return "deviceLeases";
if (table === "device_pod_jobs") return "devicePodJobs";
return table;
-6
View File
@@ -130,12 +130,6 @@ export const CLOUD_RUNTIME_DURABLE_TABLE_COLUMNS = Object.freeze({
"created_at",
"updated_at"
]),
device_pod_grants: Object.freeze([
"device_pod_id",
"user_id",
"created_by_admin_id",
"created_at"
]),
device_leases: Object.freeze([
"device_pod_id",
"holder_session_id",