Replace is_signee with a new owner role
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_signeecolumn onOrganizerPositionandOrganizerPositionInviteto reference the owner role - Adds a one time job
OneTimeJobs::BackfillOwnersto set each signee's role to owner
When this PR is merged:
Run OneTimeJobs::BackfillOwners.perform
Next PRs:
- Drop the
is_signeecolumn onOrganizerPositionandOrganizerPositionInvite - 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: