DFE-Digital / DFE-Digital/compass
View "Work" as a <user>
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 0
- Forks
- 1
- Avg merge
- 1m
- Merged PRs (30d)
- 3
Description
View "Work" as a User
Description
Add a "View as" feature to the Work/Projects section that allows administrators to see what work items another user would see in their "Your work" view. This is useful for troubleshooting, support, or understanding what projects are visible to a specific user.
Important: This feature does not change any permissions or grant access to modify data. It only displays what that person would see - administrators cannot perform actions on behalf of the viewed user.
Requirements
- Add a "View as" option to the project navigation navbar
- Create a user selection page that allows admins to search and select a user using the existing user picker component
- Display the selected user's "Your work" view as if they were logged in
- Show a clear banner indicating when viewing as another user with option to return to normal view
- Preserve all filters and navigation state when viewing as another user
- All existing filters (search, RAG status, business area, phase, flagship, priority, status) must work in "View as" mode
Acceptance Criteria
- "View as" link appears in navbar
- User selection page with explanatory content
- Projects displayed match what the selected user would see
- Banner shows "Viewing as: [User Name] ([Email])" with return button
- All filters work correctly in "View as" mode
- Non-admin users cannot access the feature
- Feature is read-only (no data modification)
Technical Implementation
- New actions:
ProjectController.ViewAs()andProjectController.ViewAsUser() - Updated
GetProjectsView()to accept optionaltargetUserEmailparameter - New view:
Views/Project/ViewAs.cshtml - Updated
Views/Project/Index.cshtmlfor navbar and filter preservation
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ProjectController.ViewAs(), ProjectController.ViewAsUser(), and GetProjectsView(), then inspect Views/Project/ViewAs.cshtml and Views/Project/Index.cshtml, including the existing user picker and filter state. Done means the acceptance criteria are met: admins can view a selected user's read-only work with preserved filters, a clear return banner, and no access for non-admins.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- authorization, full-stack
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100