raystack / raystack/frontier

Migrate React SDK and Admin SDK to use new role-based RPCs

Open
#1,462 3 comments 0 reactions 0 assignees View on GitHub

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 policymanage instead of update (or align backend to check update)
  • Refresh permissions after role changes (currently checked once on page load)
  • Org members page: call listOrganizationRoles alongside listRoles so custom org roles appear in the role-change dropdown

Depends on

  • #1459 — SetOrganizationMemberRole backend RPC
  • #1461 — SetProjectMemberRole and RemoveProjectMember backend RPCs

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.