KamoCRM

A member's security level follows their member type

Featurekamo-shared-library
Shipped
November 13, 2026 at 12:25 AM UTC
Author
Kamo
Commit
3a838c2

The owner's rule, in one place: MemberSecurityLevelPolicy. A team member holds Team Member or higher (it may be raised, never left below); a member holds Member only. Becoming a team member raises a lower level to Team Member and keeps a higher one; becoming a member sets Member, even from a raised level. - MemberService.changeMemberType: the one way to switch MEMBER <-> TEAM_MEMBER. It writes the discriminator, the member_team_member row and the security level together (native SQL, beside the existing updateMemberType). - **************** refuses a level the member's type cannot hold **************** an IllegalArgumentException with a reason). An echo of the level already held is not judged. - **************** refuses a level below Team Member. - **************** native SET SECURITY_LEVEL. No entity or schema change.

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