-
Notifications
You must be signed in to change notification settings - Fork 3.9k
fix: prevent self approvals #56944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
fix: prevent self approvals #56944
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
6196ec2
fix logic
lakchote e87f5c8
fix logic in case of default approval workflow
lakchote fadca21
fix style
lakchote 3678a1e
fix lint
lakchote 6135637
improve wording
lakchote ec34253
improve logic for self approvals
lakchote 22453bc
update logic for self approvals
lakchote 49eac2d
fix style
lakchote e9b7d25
Merge branch 'main' into lucien/fix-prevent-self-approvals
lakchote 2453425
fix lint
lakchote 120d6e0
fix lint
lakchote 8ed72e6
fix prettier
lakchote 4505667
fix lint
lakchote 5fdfdd6
Merge branch 'main' into lucien/fix-prevent-self-approvals
lakchote acca957
handle prevent self approvals
lakchote 1d4c2a1
add keys for workflows prevent self approvals
lakchote c68f19f
fix style
lakchote 32a9de8
fix lint
lakchote bb38640
update error for self approvals in workflows
lakchote 646267d
fix edge case
lakchote c925640
fix prettier
lakchote fa56af6
remove unneeded method
lakchote 80049d2
revert changes related to prevent self approvals
lakchote 972e5a5
remove unneeded translations
lakchote 31f24c7
remove new logic to keep previous logic
lakchote a9c2023
create `buildOptimisticNextStepForPreventSelfApprovalsEnabled()`
lakchote 2a0e776
use `buildOptimisticNextStepForPreventSelfApprovalsEnabled()`
lakchote 3a92739
fix style
lakchote d47518f
Merge branch 'main' into lucien/fix-prevent-self-approvals
lakchote 8bc65f2
fix
lakchote f6adc07
fix
lakchote 7346dd3
fix style
lakchote 920eb3d
Merge branch 'main' into lucien/fix-prevent-self-approvals
lakchote File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm shouldn't we only be doing
buildOptimisticNextStepForPreventSelfApprovalsEnabledifpolicy?.preventSelfApprovalAND if the submitter is the next receiver?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More investigation in https://expensify.slack.com/archives/C06ML6X0W9L/p1741645160823569 - but yeah OldDot is correctly showing the next steps as "Waiting for to approve expenses" b/c I'm not submitting to myself 😬 I thinkkkkk i can put up a quick fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created #58128 to fix