Give Service Work its first five rights

Featurekamo-shared-library
Shipped
August 26, 2026 at 5:09 AM UTC
Author
Kamo
Commit
8f9aea4

ServiceType.SERVICE(28) shipped with zero rights, so its nine endpoints were gated only by whether the caller had a session. Ids start at 268 rather than the planned 265: a concurrent change was claiming 265-267 for Patient Records. Ids are never reused and a duplicate is fatal — RoleRightType builds LOOKUP_BY_ID with Collectors.toMap, which throws on a duplicate key, so two rights sharing an id stop every service that loads this enum from booting. They carry ServiceType.POS, not SERVICE. No RoleRightType uses SERVICE, RETAIL or RENTAL; all 36 commerce rights use the parent app type, and the permission editors filter on exact serviceType equality — so a SERVICE tag would have needed its own editor section and still left the other 36 invisible. VIEW_OWN_SERVICE_WORK is a sibling of VIEW_SERVICE_WORK under ACCESS_COMMERCE, never its child: a customer seeing their own jobs must not inherit staff-wide visibility. Same shape as VIEW_OWN_SUBSCRIPTIONS beside VIEW_SUBSCRIPTIONS. Committed through a private index so a concurrent session's in-flight Patient Records rights, live in the same two files, are not swept in.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing