Skip to content

Add organization role descriptions and tooltips to member management - #1193

Draft
aschkandw wants to merge 1 commit into
mainfrom
cursor/add-org-role-tooltips-25ad
Draft

Add organization role descriptions and tooltips to member management#1193
aschkandw wants to merge 1 commit into
mainfrom
cursor/add-org-role-tooltips-25ad

Conversation

@aschkandw

Copy link
Copy Markdown

Why

There were two separate role systems in the product, and the organization membership roles (owner, admin, member) had no in-UI explanation. The role <select> in member management just listed the three role names with no descriptions or tooltips, unlike the platform/system roles which already have hover-card descriptions in the user create/edit modals. This left users guessing what each org role can actually do.

What changed

  • Added org-role helpers in dashboard/src/utils/roles.ts:
    • ORG_MEMBER_ROLES (ordered least→most privileged)
    • formatOrgRoleForDisplay
    • getOrgRoleDescription — plain-language summary of each role's capabilities
  • Updated MemberManagement.tsx:
    • Added an info hover-card next to the Members heading that lists all three org roles and what they can do. It is visible to everyone (including read-only members who just see their role badge).
    • Replaced the hard-coded role <select> items (in both the invite form and the per-member role editor) with items that show a short description under each role name. A custom Radix item is used so the description appears in the dropdown but the trigger still shows only the role name.

Role behavior reflected in the descriptions (sourced from backend authorization logic)

  • Member — can use the org (create org API keys, view usage/credit transactions, read members and webhooks); cannot manage members, change settings, or add funds.
  • Admin — everything a member can do, plus manage the org (invite/remove members, change roles, edit settings and webhooks, add funds); cannot promote others to Owner.
  • Owner — full control, including assigning the Owner role; the org must always keep at least one Owner.

These are organization-scoped roles and are independent of platform/system roles (StandardUser, PlatformManager, etc.).

Tests

  • New dashboard/src/utils/roles.test.ts covering the org-role helpers.
  • New MemberManagement tests asserting the info control is present (including in read-only mode) and surfaces the descriptions.
  • pnpm run lint, tsc --noEmit, and the affected vitest suites all pass.
Open in Web Open in Cursor 

Co-authored-by: aschkandw <aschkandw@users.noreply.github.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying control-layer with  Cloudflare Pages  Cloudflare Pages

Latest commit: ddf93b8
Status: ✅  Deploy successful!
Preview URL: https://7c6628b8.control-layer.pages.dev
Branch Preview URL: https://cursor-add-org-role-tooltips.control-layer.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants