feat(roles): stop gating custom role creation behind CUSTOM_ROLES

Merged
ET
2d ago
+4-208

Summary

Reverts the role creation gate added in #29014. Creating a custom role, or making an agent-only role assignable to members or API keys, no longer requires the CUSTOM_ROLES entitlement. Assigning a custom role is still gated (#28218).

  • FlatRoleValidatorService: drop the validateRoleIsEntitled checks on create and update.
  • Delete validate-role-is-entitled.util.ts, does-role-require-custom-roles-entitlement.util.ts and its spec, and the now unused PermissionsExceptionMessage.CUSTOM_ROLES_NOT_ENTITLED. PermissionsExceptionCode.CUSTOM_ROLES_NOT_ENTITLED and NON_CUSTOM_ROLE_UNIVERSAL_IDENTIFIERS stay, the assignment gate uses them.
  • Integration spec: the two "should refuse" creation/update cases become one "should still create" case; their snapshots are removed.
  • Docs: remove the app roles note saying installs are refused without the Organization plan.

Not touched: the Settings "Create Role" button is still disabled without the entitlement (front, from #29014). The example app roles keep canBeAssignedToUsers / canBeAssignedToApiKeys set to false.

Merge Danger

Door: two-way

Blast Radius: role creation, app installs

Workspaces without CUSTOM_ROLES can create member or API key roles again from the API, AI tools and app installs, but still cannot assign them.