KamoCRM

28 unenforced becomes 26 — AI models and usage are gated

Fixkamo-internal
Shipped
15 ஆகஸ்ட், 2026 அன்று 5:52 AM UTC
Author
kamo
Commit
68e1ca4

MANAGE_AI_MODELS gates all four endpoints of AiModelController and VIEW_AI_USAGE both of AiUsageController. Neither checked a right before, only org ownership. The model list is gated where the mailbox list was not, and the difference is the consumer rather than the endpoint: every caller of /api/ai/models is a settings tab, while the mailbox list also feeds recipient autocomplete. Following the consumer is the only thing that distinguishes them. Nobody loses anything — the three AI admin rights are held by the same 14 roles and 33 members. The document also notes that this is now a third service with its own copy of a hasRight helper, that it was written fail-closed because KBService's version was not, and that consolidating them is worth doing after the enforcement work rather than during it.

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