KamoCRM

Use managed role references when creating role rights in createOrganization

Fixkamo-shared-library
Shipped
22 மார்ச், 2026 அன்று 9:30 PM UTC
Author
Kamo
Commit
6dd7cc6

After organizationRepository.save(), the local roleAdmin/roleEveryone variables could be detached from the persistence context. createRoleRights() was adding OrgRoleRight entries to the detached objects, which were never cascaded on the subsequent save. Now retrieves managed role references from persistedOrg.getRoles() after the initial save.

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