Assign organization owners
An Organization
will need owners. Ownership represents a type of membership.
- Every Organization will require at least one owner.
- The user who creates the Organization will be assigned as the Organization owner.
- The
Organizations::Organization::DEFAULT_ORGANIZATION
should assign alladmin
users as owners.
Availability & Testing
Some testing scenarios to think about:
- That we do not grant someone access they shouldn't have because they've been made an organization owner (ability to see projects in another company because they're both in
Organizations::Organization::DEFAULT_ORGANIZATION
). See #423200 (comment 1683547706) - Performance impacts of the migration, during the migration?
Plan
-
Add a new access_level
column(enum) toorganization_users
with a default setting for the access_level in the database. !140817 (merged) -
Add user who creates the organization as the owner. !140817 (merged) -
Add data migration to add all admin
users toorganization_users
asowner
access_level for the default organization. !141297 (merged) -
Add logic to add user to organization_users
as owner for the default organization when added or updated to an instance admin !141297 (merged) -
Add logic to downgrade from a default user in organization_users
for the default organization when user is updated to not be an instance admin. !141297 (merged) -
Add logic to add user to organization_users
as a default user for the default organization on user creation. maybe !141297 (merged) -
Define access_level
access in policies. !139188 (merged) -
Rollout update_default_organization_users
feature flag via #437896 (closed) -
Remove the Feature Flag update_default_organization_users
- !142975 (merged) -
Reschedule instance admin backfill - !142979 (merged)
Edited by Doug Stull