fix(backend): allow users with read access level to revoke their own access on shared workflows#4143
Conversation
|
Thanks for the PR. A few comments:
|
For 1. In the video, the user clicks on the share button for the workflow. |
|
@chenlica I have added test cases. |
|
@aicam Please review it. |
|
@chenlica After some investigation, I found that MockTexeraDB has a bug that does not allow the test cases to pass when running the full test suite (test cases pass when ran individually). I suggest removing the test cases for this PR, investigate the issue deeper and fix it, then add the test cases back in a separate PR. |
|
@carloea2 Is it related to a recent finding you have related to MockTexeraDB? |
Yes, I suggest he tries to add his new test cases into a test file accessing the same resources (ad-hoc solution) and later investigate what is the reason. |
Head branch was pushed to by a user without write access
What changes were proposed in this PR?
This PR fixes a permission issue where users with READ access to a workflow could not revoke their own access.
Changes:
revokeAccess()method inWorkflowAccessResource.scalato allow users to revoke their own access regardless of privilege level (READ or WRITE).Before:
After:
Demo:
Screen.Recording.2025-12-29.at.6.13.00.PM.mov
Any related issues, documentation, discussions?
Fixes #4141.
How was this PR tested?
Run
sbt "WorkflowExecutionService/testOnly *WorkflowAccessResourceSpec"Was this PR authored or co-authored using generative AI tooling?
No.