Migrate React SDK and Admin SDK to use new role-based RPCs
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 344
- Forks
- 47
- Avg merge
- 4d 4h
- Merged PRs (30d)
- 26
Description
Context
Once the backend RPCs from #1459 and #1461 are implemented, both SDKs need to stop using policy RPCs (listPolicies, deletePolicy, createPolicy, createPolicyForProject) for member management and switch to the new role-based RPCs.
React SDK changes
| File | Current | Replace with |
|---|---|---|
web/sdk/react/views/members/member-columns.tsx |
listPolicies → deletePolicy x N → createPolicy |
SetOrganizationMemberRole |
web/sdk/react/views/projects/details/project-member-columns.tsx |
listPolicies → deletePolicy x N → createPolicy |
SetProjectMemberRole |
web/sdk/react/views/projects/details/project-members.tsx |
createPolicyForProject |
SetProjectMemberRole |
web/sdk/react/views/projects/details/remove-project-member-dialog.tsx |
listPolicies → deletePolicy x N |
RemoveProjectMember |
web/sdk/react/views/api-keys/list/add-service-account-dialog.tsx |
createPolicyForProject |
SetProjectMemberRole |
web/sdk/react/views/api-keys/details/manage-service-user-projects-dialog.tsx |
createPolicyForProject / listPolicies → deletePolicy x N |
SetProjectMemberRole / RemoveProjectMember |
Admin SDK changes
| File | Current | Replace with |
|---|---|---|
web/sdk/admin/components/AssignRole.tsx |
listPolicies → deletePolicy x N → createPolicy x N |
SetOrganizationMemberRole |
web/sdk/admin/views/organizations/details/projects/members/assign-role.tsx |
listPolicies → deletePolicy x N → createPolicy x N |
SetProjectMemberRole |
web/sdk/admin/views/organizations/details/projects/members/remove-member.tsx |
listPolicies → deletePolicy x N |
RemoveProjectMember |
web/sdk/admin/views/organizations/details/projects/use-add-project-members.tsx |
createPolicy |
SetProjectMemberRole |
Additional SDK fixes
- Gate org role-change UI on
policymanageinstead ofupdate(or align backend to checkupdate) - Refresh permissions after role changes (currently checked once on page load)
- Org members page: call
listOrganizationRolesalongsidelistRolesso custom org roles appear in the role-change dropdown
Depends on
- #1459 —
SetOrganizationMemberRolebackend RPC - #1461 —
SetProjectMemberRoleandRemoveProjectMemberbackend RPCs
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing dependent issues #1459 and #1461, then inspect the React and Admin SDK entry points listed in the tables. Replace the policy-RPC flows with the named role RPCs, apply the permission and role-list fixes, and confirm all listed member-management paths use the new behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- authorization, frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100