Conversation
What was broken Project Manager users could open the Projects page, but the New Project action was hidden and the create route redirected them back to the list. Root cause (if identifiable) The shared work-app project permission helper only treated copilots and talent managers as eligible to create projects when no project context was present. What was changed Updated the project management permission helper so Project Manager roles can create new projects while keeping existing project edit access membership-based. Added a Projects list regression test to verify the New Project action renders for Project Manager users. Any added/updated tests Updated permissions.utils.spec.ts to cover Project Manager create access and preserve membership requirements for editing. Added ProjectsListPage.spec.tsx to cover the Projects page header action.
# Conflicts: # src/apps/work/src/lib/utils/permissions.utils.spec.ts # src/apps/work/src/lib/utils/permissions.utils.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was broken
Project Manager users could open the Projects page, but the New Project action was hidden and the create route redirected them back to the list.
Root cause (if identifiable)
The shared work-app project permission helper only treated copilots and talent managers as eligible to create projects when no project context was present.
What was changed
Updated the project management permission helper so Project Manager roles can create new projects while keeping existing project edit access membership-based.
Added a Projects list regression test to verify the New Project action renders for Project Manager users.
Any added/updated tests
Updated permissions.utils.spec.ts to cover Project Manager create access and preserve membership requirements for editing.
Added ProjectsListPage.spec.tsx to cover the Projects page header action.
Validation run:
yarn test:no-watch --runInBand --runTestsByPath src/apps/work/src/lib/utils/permissions.utils.spec.ts src/apps/work/src/pages/projects/ProjectsListPage/ProjectsListPage.spec.tsx,yarn lint, andyarn run build.Full
yarn test:no-watch --runInBandstill reports pre-existing failures insrc/apps/wallet-admin/src/home/tabs/payments/PaymentsListView.spec.tsx, and those same failures reproduce on a cleandevworktree.