Skip to content

Comments

[PROD RELEASE] - Restrict Engagements Tab only to Admin Role#1731

Merged
kkartunov merged 2 commits intomasterfrom
develop
Feb 17, 2026
Merged

[PROD RELEASE] - Restrict Engagements Tab only to Admin Role#1731
kkartunov merged 2 commits intomasterfrom
develop

Conversation

@kkartunov
Copy link
Contributor

{ id: 1, label: 'All Work' },
{ id: 2, label: 'Projects' },
...(canViewEngagements ? [{ id: 3, label: 'Engagements' }] : []),
...(isAdmin ? [{ id: 3, label: 'Engagements' }] : []),

Choose a reason for hiding this comment

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

[❗❗ correctness]
The change from canViewEngagements to isAdmin restricts the visibility of the 'Engagements' tab to only admin users. Ensure that this change aligns with the intended business logic, as it removes access for any other roles that might have previously been able to view this tab.

}
if (pathname === '/engagements') {
return canViewEngagements ? 3 : 0
return isAdmin ? 3 : 0

Choose a reason for hiding this comment

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

[❗❗ correctness]
The change from canViewEngagements to isAdmin in the getTabFromPath method alters the logic for determining access to the '/engagements' path. Ensure that this change aligns with the intended access control requirements, as it now restricts access solely to admin users.

this.props.unloadProjects()
this.setState({ currentTab: 2 })
} else if (tab === 3 && canViewEngagements) {
} else if (tab === 3 && isAdmin) {

Choose a reason for hiding this comment

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

[❗❗ correctness]
The condition for navigating to the '/engagements' path has been changed to check isAdmin instead of canViewEngagements. This could potentially restrict access for users who are not admins but should have access based on previous logic. Verify that this change is intentional and aligns with the new requirements.

)()}
/>
{canAccessEngagements && (
{isAdmin && (

Choose a reason for hiding this comment

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

[❗❗ correctness]
The change from canAccessEngagements to isAdmin may impact users who previously had access under the Talent Manager role. Ensure that this change aligns with the intended access control policy.

/>
)}
{!canAccessEngagements && (
{!isAdmin && (

Choose a reason for hiding this comment

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

[❗❗ correctness]
Similarly, the change from !canAccessEngagements to !isAdmin restricts the warning message to only non-admin users. Verify that this behavior is consistent with the new role-based access requirements.

@kkartunov kkartunov merged commit 17d5c45 into master Feb 17, 2026
9 checks passed
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