Skip to content

feat: restrict member actions based on access level - #460

Merged
rax7389 merged 3 commits into
feat/my-org-ea-branchfrom
feat/member-access-actions-restrict
Aug 8, 2026
Merged

feat: restrict member actions based on access level#460
rax7389 merged 3 commits into
feat/my-org-ea-branchfrom
feat/member-access-actions-restrict

Conversation

@rax7389

@rax7389 rax7389 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Implement Member Access Level Gating to control what actions OrgAdmins can perform on members based on their computed access_level field.

Why

Members with readonly or none access levels should not be modifiable (assign/remove roles, remove from org). This is part of the Member Management EA1 feature set (UIC-1170).

What

  • Add canMutateMember() utility function that returns true only for 'limited' or 'full' access levels
  • Hide "Assign Roles" and "Remove from Organization" menu items for readonly members in the table actions dropdown
  • Disable buttons with tooltips for readonly members in the member detail pages (Details tab and Roles tab)
  • Hide row checkboxes in the roles table for readonly members
  • Add access_level to member list fields query
  • Add comprehensive test coverage for all access level gating scenarios

Packages

  • packages/core
  • packages/react
  • examples

References

  • Related to UIC-1170: Member Access Level Gating

Testing

  • This change adds unit test coverage
  • Tested for both SPA and RWA flows, all example apps working
  • All existing and new tests complete without errors

Checklist

  • Breaking change
  • Requires docs update
  • Backward compatible

Contributing

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added access-level controls to member management actions.
    • Read-only and non-modifiable members can view details but cannot assign roles, remove members, or select rows.
    • Added explanatory tooltips for unavailable actions.
    • Full and limited access members retain appropriate management capabilities.
  • Bug Fixes

    • Member access levels are now included when loading organization members.
    • Invitation filtering now includes only members with full access.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes restricting member actions according to access level, which is the main change.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rax7389 rax7389 self-assigned this Aug 6, 2026
@rax7389 rax7389 added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Aug 6, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/core/src/i18n/translations/en-US.json`:
- Line 1205: Update the readonly_member_tooltip translation to use
access-level-neutral wording that describes unavailable modification access, so
it is accurate for both read-only members and members with access_level "none".
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 661a71ba-592e-4bc8-a470-d1a14a4dbbf9

📥 Commits

Reviewing files that changed from the base of the PR and between a44b34e and 399cb35.

📒 Files selected for processing (14)
  • packages/core/src/i18n/translations/en-US.json
  • packages/react/src/components/auth0/my-organization/shared/member-management/members/members-table/__tests__/organization-member-table-actions-column.test.tsx
  • packages/react/src/components/auth0/my-organization/shared/member-management/members/members-table/organization-member-table-actions-column.tsx
  • packages/react/src/components/auth0/my-organization/shared/member-management/organization-member-detail/__tests__/organization-member-details-tab.test.tsx
  • packages/react/src/components/auth0/my-organization/shared/member-management/organization-member-detail/__tests__/organization-member-roles-tab.test.tsx
  • packages/react/src/components/auth0/my-organization/shared/member-management/organization-member-detail/organization-member-details-tab.tsx
  • packages/react/src/components/auth0/my-organization/shared/member-management/organization-member-detail/organization-member-roles-tab.tsx
  • packages/react/src/hooks/my-organization/__tests__/use-member-management-service.test.ts
  • packages/react/src/hooks/my-organization/shared/services/use-member-management-service.ts
  • packages/react/src/lib/constants/my-organization/member-management/member-management-constants.ts
  • packages/react/src/lib/utils/my-organization/member-management/__tests__/member-management-utils.test.tsx
  • packages/react/src/lib/utils/my-organization/member-management/member-management-utils.ts
  • packages/react/src/tests/utils/__mocks__/my-organization/member-management/member.mocks.ts
  • packages/react/src/types/my-organization/member-management/organization-member-detail-types.ts

Comment thread packages/core/src/i18n/translations/en-US.json Outdated
Base automatically changed from feat/member-access-filter to feat/my-org-ea-branch August 8, 2026 11:20
@rax7389
rax7389 merged commit 4a0804c into feat/my-org-ea-branch Aug 8, 2026
2 checks passed
@rax7389
rax7389 deleted the feat/member-access-actions-restrict branch August 8, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants