Use managed role references when creating role rights in createOrganization

Fixkamo-shared-library
Shipped
March 22, 2026 at 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?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing