Skip to content

feat: technique proposals page use tags#1601

Open
Scott-James-Hurley wants to merge 18 commits into
developfrom
technique_proposals_changes
Open

feat: technique proposals page use tags#1601
Scott-James-Hurley wants to merge 18 commits into
developfrom
technique_proposals_changes

Conversation

@Scott-James-Hurley

@Scott-James-Hurley Scott-James-Hurley commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Closes UserOfficeProject/issue-tracker#1554

Description

If the user is logged in as a derived User Officer role with tags assigned to it, they will only see calls and instruments, and in turn, proposals and techniques, that are associated with those tags on the technique proposals page. They will also only be able to assign proposals to instruments that have the same tags as their derived role. This allows for siloed User Officers, who can only see and edit technique proposals for their facility.

Motivation and Context

Another facility (Central Laser Facility) at STFC has expressed interest in using the technique proposals feature. A requirement is that ISIS and CLF User Officers should not be able to see entities (calls, instruments, proposals, etc) from the other facility. Currently, there is no way to limit what User Officers can see on the technique proposals page.

How Has This Been Tested

Added E2E tests

Fixes

Fix PR also fixes an issue where trying to create a derived role of certain roles would throw an error.

Changes

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@Scott-James-Hurley Scott-James-Hurley changed the title Technique proposals changes feat: technique proposals page use tags Jun 24, 2026
@Scott-James-Hurley Scott-James-Hurley marked this pull request as ready for review June 24, 2026 10:21
@Scott-James-Hurley Scott-James-Hurley requested a review from a team as a code owner June 24, 2026 10:21
@Scott-James-Hurley Scott-James-Hurley requested review from William-Edwards-STFC and removed request for a team June 24, 2026 10:21
);
} else {
const instrumentsByCallIds =
await this.dataSource.getInstrumentsByCallId(callIds);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This might be a stupid question, but surely if .getInstrumentsByCallId( is called instead of .getInstruments( then your new filter on tag won't apply. Wouldn't this contradict the idea of the PR to limit what these users can see?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

From what I can see, getInstrumentsByCallId is not called when populating the instrument filter on the technique proposals page. The call to fetch instruments doesn't contain a call id so it will take the path starting line 47, not line 54. Happy to corrected if I'm mistaken, though.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I see you're right, but what about

.getInstrumentsMinimal({ callIds }) in useInstrumentsMinimalData.ts,

should that one also be using your filter?

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.

Xpress feature enhancement - Implement Tags in Xpress flows

2 participants