fix: assigning a user officer as fap reviewer for stfc#1337
Open
fix: assigning a user officer as fap reviewer for stfc#1337
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
StfcFapDataSource.tsto 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.StfcUserDataSource.ts.How Has This Been Tested?
Fixes Jira Issue
https://jira.esss.lu.se/browse/
Depends On
Tests included/Docs Updated?