openvibers/openvibe.network Commits

Network: Watch may start a coding task for a watch's owner on Codes (#181)

OP OpenVibers committed 30 days ago · 7b6555a2c9 · 1 file, +2 −0

Plan T18/T16: a watch's `codes-run` action starts a coding task for its owner on OpenVibe.Codes (Watch#55).

- `watch` gets `codes.task.start` for audience `openvibe.codes`.
- Codes shows a service only the tasks it started, for the person in `X-OV-Subject`.

**Tests:** `principals` passes.

Changes

ddiff --git a/server/identity/principals.js b/server/identity/principals.js
iindex 80074fb3..9941dcc0 100644
---- a/server/identity/principals.js
++++ b/server/identity/principals.js
@@@ -276,6 +276,8 @@ const DEFAULT_GRANTS = [
// Plan T16/T17 (contracts 0.162.0): a person's OpenVibe.Actor agent routes coding work to OpenVibe.Codes, which runs
// it on that person's own machine (X-OV-Subject); Codes shows Actor only the tasks Actor started for that person.
...['codes.task.start', 'codes.task.read', 'codes.task.cancel'].map((c) => ['actor', c, 'openvibe.codes', []]),
++ // Plan T18/T16: a watch's codes-run action starts a coding task for its owner on Codes (Watch#55).
++ ['watch', 'codes.task.start', 'openvibe.codes', []],
// Plan T2 lane B step 3: Host places and runs per project, so it reads a project's tenancy, placement and quotas.
// Other services get this row only when they ship a caller of GET /internal/projects/:project_id.
['host', 'network.project.read', SELF_AUDIENCE, []],