Skip to content

osy 0.19.5

Choose a tag to compare

@osysharp-publisher osysharp-publisher released this 12 Nov 07:41

This release makes the kits follow your app's own rules, and closes the audit trail unless you open it. A few things that passed before are now refused; each has its fix beside it. To upgrade, run osy upgrade, then osy update in a project. Take UserManagement 0.11.0, Invitations 2.0.1 and Organizations 0.8.0 together with it.

Breaking changes

  • Your app's deny on a kit's rows now binds the kit. A deny your app writes on a kit entity such as RoleGrant or MembershipRole holds on every route the kit offers: giving and taking a role, adding an integration, accepting an invitation, removing a member. A refused change is recorded as refused and the caller is told with your rule's own message. Fix: if a kit route should pass, narrow your rule's where, or give the role through your own function. It takes effect at your app's next compile. Docs
  • An invitation's role is judged for the person who sent it. When an invitation is accepted, your rules are checked against the inviter as they stand at that moment. An inviter who has since lost the standing, or whose account is switched off, no longer gives the role: the invitation is refused at the door and nothing lands. Fix: send a new invitation. Docs
  • An audit trail nobody was given the read of is read by nobody. An app that keeps a trail and reads it in a function, on a page or over GET …/entities/<E>/{id}/audit with no Read declared for that surface now gets no rows (REST answers 403 naming the line to add). Fix: app.Audit = new AuditConfig { EntityAuditRecord = new AuditSurface { Read = user => <who> } };. <Entity>.Changes(id) answers only for a row the caller may read. Docs
  • A field with a deny read is not written to the change trail. It is recorded as changed, with its value redacted on both sides, in your app and in every kit you use. Rows recorded before this version keep the values they hold. Docs
  • MCP refusals are errors. get_ of a row that is missing or that the caller may not read now answers an error with the code not-found; a bad id or a missing argument is invalid. Every refusal carries its code in _meta["osy/error"]. Fix: a client that read the text of a "not found" answer as a success checks isError. Docs

Fixes

  • MCP tools that answer a row work on a fresh host. query_, get_ and update_ could fail with a serializer error until some other call had run. A write now produces its answer before it commits, so a failed answer writes nothing.
  • watch over MCP no longer fails when entity_type is left out, and knows the entities of typed catalogs.
  • Removing a member is refused whole. When your app's rule forbids taking a role away, the Organizations kit's removal is recorded as refused, takes back what it had done, and says your rule's message.
  • A resent invitation starts its time over. It used to lapse on the first send's clock.

Language

  • Short entity names in REST and MCP. The full name always works. The short name works when exactly one entity that surface exposes has it: /entities/Product, query_Product. Listings (tools/list, openapi.json) show the short name when it is unique. If a later version adds a second entity with the same short name, the short name is refused and the full name keeps working. Docs
  • [JudgedFor] for kit authors. A kit function can have the app's rules judged for a person a row of its own names, such as an invitation's sender. Docs

Kits

  • UserManagement 0.11.0. Everything from 0.10.0 is still there. AddIntegration("Relay") makes an integration that holds no role until your app gives it one through its own route. The person drawer keeps its two destructive actions together, each asking first, and "Add role" shows every role with the held ones marked. API keys, integrations and access changes are tables. An app places any kit settings section in its own group and order. Docs
  • Invitations 2.0.1 and Organizations 0.8.0 carry the changes above.
  • Also released: Dns 0.3.0 and Ui 3.3.0.