KamoCRM

Administrators may edit the Administrator role's rights, never switching off CONFIGURE_SYSTEM

Featurekamo-shared-library
Shipped
October 28, 2026 at 2:57 AM UTC
Author
Kamo
Commit
7e027cc

The Administrator (Full Access) role is stored isAllowEditSecurity=false, so no one could change its rights. **************** is the one door in: it accepts only the org's role_admin_id role and refuses any save (after normalizing the level) that leaves a right in **************** short of GRANTED. That set is CONFIGURE_SYSTEM plus its ancestors: the right that opens Settings > Essential and every role write, so its holders can always come back. SecurityRoleDTO.lockedRights tells the editor which switches are pinned.

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