swarm: merge a re-create into the stored agent permissions instead of overwriting them
This commit is contained in:
parent
8699857024
commit
ae8b2d39ec
1 changed files with 108 additions and 22 deletions
|
|
@ -314,10 +314,12 @@ none. swarm-controller logs every refused `PUT` or `DELETE` on that route at `wa
|
|||
**Internet flag** — the record also carries `unrestricted_internet`, a
|
||||
boolean that isn't a `Permission`. An absent value means on, so every agent
|
||||
that existed before the field keeps the open access it had. `POST /api/agents`
|
||||
always writes the record with an explicit value, `false` unless the request
|
||||
names it. A `PUT` that leaves the field out and a `DELETE` (`swarmctl agent
|
||||
permissions clear`) keep the stored value; a `DELETE` on an agent that has one
|
||||
rewrites the record to just that value. Read it with
|
||||
writes `false` for an agent that has no record, unless the request names a
|
||||
value. Over an existing record (a re-create) it keeps the stored list and flag,
|
||||
an absent flag included, and a value in the request wins. A `PUT` that leaves
|
||||
the field out and a `DELETE` (`swarmctl agent permissions clear`) also keep the
|
||||
stored value; a `DELETE` on an agent that has one rewrites the record to just
|
||||
that value. Read it with
|
||||
`swarm_queue_client::agent_permissions::unrestricted`. Nothing acts on it yet.
|
||||
|
||||
**How a change applies** —
|
||||
|
|
|
|||
Loading…
Reference in a new issue