DFE-Digital / DFE-Digital/compass

View "Work" as a <user>

Open
#147 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Add a "View as" option to the project navigation navbar
  2. Create a user selection page that allows admins to search and select a user using the existing user picker component
  3. Display the selected user's "Your work" view as if they were logged in
  4. Show a clear banner indicating when viewing as another user with option to return to normal view
  5. Preserve all filters and navigation state when viewing as another user
  6. 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() and ProjectController.ViewAsUser()
  • Updated GetProjectsView() to accept optional targetUserEmail parameter
  • New view: Views/Project/ViewAs.cshtml
  • Updated Views/Project/Index.cshtml for navbar and filter preservation

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.