Scope. Add the role attribute and backfill from Account.admin_id, set up dual-write on existing ownership-mutation paths, and ship the permission infrastructure in code without yet consuming it.
Acceptance criteria
References. RFC §Phase 1, parent #6646.
Scope. Add the role attribute and backfill from
Account.admin_id, set up dual-write on existing ownership-mutation paths, and ship the permission infrastructure in code without yet consuming it.Acceptance criteria
OrganizationRoleenum (owner,admin,member) added.rolecolumn added toUserOrganizationwith defaultmember.Account.admin_iduser isowneron their membership; everyone else ismember.change_adminflow swap roles (previous owner →admin, new admin →owner) in the same transaction as theAccount.admin_idmutation.Account.admin_iduser intoowneror move that user out ofowner.role → permissionsandscope → implied_permissionstables landed in code; fine-grained permission strings (organizations:edit_settings,organizations:delete,organizations:manage_payout_account,members:invite,members:remove,members:set_role) defined.Account.admin_id.References. RFC §Phase 1, parent #6646.