Where
web/sdk/react/views-new/members/components/update-role-dialog.tsx
Problem
The new members page dialog still changes an org member's role by:
listPolicies({ orgId, userId })
deletePolicy per existing policy
createPolicy against app/organization: with the new role
The dedicated RPC SetOrganizationMemberRole should be used instead — same pattern as the legacy view migration in #1477.
How it happened
Same flavor of drift fixed for groups in #1608 / #1609.
Suggested fix
Replace useQuery(listPolicies) + useMutation(deletePolicy) + useMutation(createPolicy) with a single useMutation(setOrganizationMemberRole). Drop the unused schemas/types.
const { mutateAsync: setOrgMemberRole } = useMutation(
FrontierServiceQueries.setOrganizationMemberRole
);
await setOrgMemberRole(create(SetOrganizationMemberRoleRequestSchema, {
orgId: organizationId,
userId: payload.memberId,
roleId: payload.role.id,
}));
Related
Where
web/sdk/react/views-new/members/components/update-role-dialog.tsxProblem
The new members page dialog still changes an org member's role by:
listPolicies({ orgId, userId })deletePolicyper existing policycreatePolicyagainstapp/organization:with the new roleThe dedicated RPC
SetOrganizationMemberRoleshould be used instead — same pattern as the legacy view migration in #1477.How it happened
views/members/member-columns.tsxtosetOrganizationMemberRole.Same flavor of drift fixed for groups in #1608 / #1609.
Suggested fix
Replace
useQuery(listPolicies)+useMutation(deletePolicy)+useMutation(createPolicy)with a singleuseMutation(setOrganizationMemberRole). Drop the unused schemas/types.Related