Skip to content

Make user admin error message consistent#2163

Open
ericaporter wants to merge 2 commits intomainfrom
make-user-admin-error-message-consistent
Open

Make user admin error message consistent#2163
ericaporter wants to merge 2 commits intomainfrom
make-user-admin-error-message-consistent

Conversation

@ericaporter
Copy link
Contributor

@ericaporter ericaporter commented Feb 5, 2026

Relating to ticket
Context

Unauthorised access messaging was inconsistent between the Finance and Users admin areas.

Changes proposed in this pull request

  • Aligned the Users admin unauthorised message with the existing Finance pattern
  • Updated Users admin to render the shared unauthorised page with a clear heading and context-specific copy
  • Ensured consistent messaging when access is blocked, including direct URL access

Guidance to review

  • Trigger unauthorised access to Users admin and Finance admin to confirm messaging is consistent
  • Check that the correct explanatory text is shown for each context

@ericaporter ericaporter self-assigned this Feb 5, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Review app deployed to https://cpd-ec2-review-2163-web.test.teacherservices.cloud

Copy link
Contributor

@avinhurry avinhurry left a comment

Choose a reason for hiding this comment

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

Looks good.

Just realised now that we have (finance > user_manager > admin) admin feels a bit misleading. One to ponder on.


it "redirects GET /admin/users with an alert" do
it "returns unauthorised for GET /admin/users with the users access error message" do
get admin_users_path
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think it's worth adding specs to check that GET /admin/users/:id and GET /admin/users/:id/edit are protected and show the same error message too?

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.

3 participants