hcb icon indicating copy to clipboard operation
hcb copied to clipboard

Replace is_signee with a new owner role

Open polypixeldev opened this issue 4 months ago • 0 comments

Summary of the problem

The logic was starting to get a little confusing with signees being a different column than role, but signees must be a manager and there must be at least 1 signee per organization. Since roles are now fully shipped, it makes sense to make signees be an owner role that is above all other roles.

Closes #12012

Describe your changes

This PR does a few things:

  • Adds the owner role to the role enum
  • Adds the owner role to the invite form, but only to admins
  • Replaces all references to the is_signee column on OrganizerPosition and OrganizerPositionInvite to reference the owner role
  • Adds a one time job OneTimeJobs::BackfillOwners to set each signee's role to owner

When this PR is merged: Run OneTimeJobs::BackfillOwners.perform

Next PRs:

  1. Drop the is_signee column on OrganizerPosition and OrganizerPositionInvite
  2. Update policies to only require an OPDR when the acting user is below manager or when removing an owner

Note: While users can be promoted to the Owner role by an admin after accepting their invite to an organization, this will not automatically send them the contract. The best way for this to work might be to store organizer position roles as manager at first, and then promote to owner once the contract is signed. This should be considered when revamping contracts in the new onboarding flow.

Invite form: image

polypixeldev avatar Nov 04 '25 03:11 polypixeldev