Skip to content

PR3023: Add interactWithPauseUserButton permission for Pause/Resume button#4960

Open
saitejakaasoju wants to merge 1 commit intoOneCommunityGlobal:developmentfrom
saitejakaasoju:sai/pause-user-permission
Open

PR3023: Add interactWithPauseUserButton permission for Pause/Resume button#4960
saitejakaasoju wants to merge 1 commit intoOneCommunityGlobal:developmentfrom
saitejakaasoju:sai/pause-user-permission

Conversation

@saitejakaasoju
Copy link

Description

Implements PR3023: Create "Interact with Pause User button" permission in the Permissions Management → User Management section.

This permission allows specific roles or individuals to see and interact with the Pause/Resume button on a user's profile.

Location of the feature:
User Profile → Basic Information → Status → Pause/Resume

Previously, users with edit status access could see the Pause/Resume button without a dedicated permission. This change introduces a new permission that controls visibility and interaction with the Pause button.

The Pause/Resume functionality itself already exists in the backend, so this PR focuses only on permission control in the frontend.

Related PRS (if any):

This change is frontend-only and uses existing backend endpoints for pause/resume functionality.
No backend PR is required.

Main changes explained:

  1. Updated Permissions.json
    • Added new permission: interactWithPauseUserButton
    • Permission description explains access to Pause/Resume button in user profile.
  2. Updated PauseAndResumeButton.jsx
    • Added permission check using hasPermission('interactWithPauseUserButton')
    • Button renders only when user has this permission.
  3. Updated BasicInformationTab.jsx
    • Passed hasPermission prop to PauseAndResumeButton component.
  4. Updated PauseAndResumeButton.test.jsx
    • Adjusted tests to account for the new permission logic.

How to test:

  1. check into current branch
  2. do npm install and ... to run this PR locally
  3. Clear site data/cache
  4. log as admin user
  5. Go to:
    User Profile → Basic Information → Status
  6. Verify Pause button is visible when the user has the interactWithPauseUserButton permission.
  7. Remove the permission from the role in:
    Permissions Management → User Management
  8. Open a user profile again and verify the Pause button is no longer visible.
  9. Reassign the permission and confirm the button appears again.
  10. Click Pause and Resume to verify the existing functionality still works correctly.
  11. Verify the feature works correctly in Dark Mode.

Screenshots or videos of changes:

Note:

This PR introduces only frontend permission control for the Pause/Resume button.
The backend pause/resume functionality already exists and remains unchanged.

Screen.Recording.2026-02-28.at.4.15.06.PM.mov

@netlify
Copy link

netlify bot commented Mar 8, 2026

👷 Deploy request for highestgoodnetwork-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit ad6a16a

@github-actions
Copy link

github-actions bot commented Mar 8, 2026

This PR has been closed because PRs from forks are not allowed. Please create a branch directly off the origin repository and resubmit your PR.

@github-actions github-actions bot closed this Mar 8, 2026
@saitejakaasoju saitejakaasoju reopened this Mar 8, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 8, 2026

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