fix: allow user to approve when they are both individual approver and group member #861
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.
Previously, when a user was listed as both an individual User approver and
a member of a Group approver, the function would return early after checking
the first matching approver type. This prevented the user from using their
other approval identity entirely.
For example, if User entry appeared before Group entry in the approvers list,
the user could only approve as an individual user and their Group membership
was completely ignored.
This fix changes IsUserApprovalChanged to check all approver types without
early returns, accumulating valid changes. Now users can exercise all their
approval permissions regardless of the order in approvers list.