KamoCRM

Give Service Work its first five rights

Featurekamo-shared-library
Shipped
26 ஆகஸ்ட், 2026 அன்று 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?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing