Skip to content

fix: assigning a user officer as fap reviewer for stfc#1337

Open
TCMeldrum wants to merge 1 commit intodevelopfrom
1513-fix-stfc-fap-roles-assignement
Open

fix: assigning a user officer as fap reviewer for stfc#1337
TCMeldrum wants to merge 1 commit intodevelopfrom
1513-fix-stfc-fap-roles-assignement

Conversation

@TCMeldrum
Copy link
Contributor

@TCMeldrum TCMeldrum commented Feb 5, 2026

Description

This PR ensures that User Officer roles are not erroneously revoked when they are also assigned as Facility Access Power (FAP) reviewers.

Motivation and Context

The existing logic revokes a user's role when they have no remaining FAP assignments. However, this was causing issues when a User Officer was also assigned as a FAP reviewer. This change is necessary to prevent User Officers from unintentionally losing their roles.

Changes

  • Added a check in StfcFapDataSource.ts to verify if a user is a User Officer before revoking their role. If the user is a User Officer and a FAP reviewer, their User Officer role will be preserved even when the FAP reviewer role is removed.
  • Removed an unused token in StfcUserDataSource.ts.

How Has This Been Tested?

Fixes Jira Issue

https://jira.esss.lu.se/browse/

Depends On

Tests included/Docs Updated?

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

@TCMeldrum TCMeldrum requested a review from a team as a code owner February 5, 2026 13:29
@TCMeldrum TCMeldrum requested review from deepaksftc and removed request for a team February 5, 2026 13:29
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.

1 participant