Skip to content

feat: set page notice for specific roles - #1824

Open
Scott-James-Hurley wants to merge 16 commits into
developfrom
set_page_notice_for_role
Open

Scott-James-Hurley wants to merge 16 commits into
developfrom
set_page_notice_for_role

Conversation

@Scott-James-Hurley

@Scott-James-Hurley Scott-James-Hurley commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

Discussion

Each role can now have it's own page notice. Derived User Officers can only edit the page notices for roles they share a tag with, base user officers can edit all page notices. There is a fallback page notice if one has not been created for a role. Please note that this PR includes only editing the page notices for roles, not displaying them to users - that will come in a proceeding PR.

Motivation and Context

Another facility at STFC is using UOP and needs to be able to display page notices specific to it's users.

How Has This Been Tested

  • Tested manually
  • Added unit tests
  • Added E2E tests

Changes

  • Adds column to pagetext table referencing role id
  • Adds query getRolesByTags for fetching all roles that had specified tags
  • Adds a role selector in the page notice editor for selecting which page notice to edit

Tests included/Docs Updated?

  • I have added tests to cover my changes.

@Scott-James-Hurley
Scott-James-Hurley requested a review from a team as a code owner September 24, 2026 08:53
@Scott-James-Hurley
Scott-James-Hurley requested review from Jonathan-Swales and removed request for a team September 24, 2026 08:53
@Scott-James-Hurley
Scott-James-Hurley requested review from a team and removed request for Jonathan-Swales September 28, 2026 10:35
Comment thread apps/frontend/src/components/pages/RoleFilter.tsx Outdated
Comment thread apps/backend/src/datasources/postgres/AdminDataSource.ts Outdated
Comment thread validation/src/Admin/index.ts Outdated
Comment thread apps/backend/src/queries/AdminQueries.ts Outdated
Comment thread apps/backend/src/queries/AdminQueries.ts Outdated
Comment thread apps/backend/src/queries/UserQueries.ts Outdated
/>
)}
</SimpleTabs>
<RoleFilter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: We should prevent navigation if user has changed the input
Kooha-2026-10-15-15-06-49.webm

Comment thread apps/backend/db_patches/0215_AddRoleToPageText.sql Outdated
Comment thread apps/backend/src/datasources/postgres/AdminDataSource.ts Outdated
Co-authored-by: Jekabs Karklins <58165815+jekabs-karklins@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants