You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "seongjinyoon (via GitHub)" <gi...@apache.org> on 2025/12/30 02:18:47 UTC
[PR] Fix/revoke access depends on level [texera]
seongjinyoon opened a new pull request, #4143:
URL: https://github.com/apache/texera/pull/4143
<!--
Thanks for sending a pull request (PR)! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines:
[Contributing to Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md)
2. Ensure you have added or run the appropriate tests for your PR
3. If the PR is work in progress, mark it a draft on GitHub.
4. Please write your PR title to summarize what this PR proposes, we
are following Conventional Commits style for PR titles as well.
5. Be sure to keep the PR description updated to reflect all changes.
-->
### What changes were proposed in this PR?
<!--
Please clarify what changes you are proposing. The purpose of this section
is to outline the changes. Here are some tips for you:
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
3. If it is a refactoring, clarify what has been changed.
3. It would be helpful to include a before-and-after comparison using
screenshots or GIFs.
4. Please consider writing useful notes for better and faster reviews.
-->
This PR fixes a permission issue where users with READ access to a workflow could not revoke their own access.
**Changes:**
- Updated `revokeAccess()` method in `WorkflowAccessResource.scala` to allow users to revoke their own access regardless of privilege level (READ or WRITE).
- Added owner protection which prevents workflow owners from revoking their own access to avoid orphaned workflows.
**Before:**
- Backend requires WRITE privilege for self-revocation.
- READ users received error when revoking their own access.
**After:**
- READ users can revoke their own access to a shared workflow (leave shared workflows).
- Owners cannot revoke their own access (prevent orphaned workflows).
**Demo:**
https://github.com/user-attachments/assets/4fa57eb0-9218-4715-bf8d-aec26f039174
### Any related issues, documentation, discussions?
<!--
Please use this section to link other resources if not mentioned already.
1. If this PR fixes an issue, please include `Fixes #1234`, `Resolves #1234`
or `Closes #1234`. If it is only related, simply mention the issue number.
2. If there is design documentation, please add the link.
3. If there is a discussion in the mailing list, please add the link.
-->
Fixes #4141.
### How was this PR tested?
<!--
If tests were added, say they were added here. Or simply mention that if the PR
is tested with existing test cases. Make sure to include/update test cases that
check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how
you tested step by step, ideally copy and paste-able, so that other reviewers can
test and check, and descendants can verify in the future. If tests were not added,
please describe why they were not added and/or why it was difficult to add.
-->
Manually tested.
### Was this PR authored or co-authored using generative AI tooling?
<!--
If generative AI tooling has been used in the process of authoring this PR,
please include the phrase: 'Generated-by: ' followed by the name of the tool
and its version. If no, write 'No'.
Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
-->
No.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(backend): allow users with read access level to revoke their own access on shared workflows [texera]
Posted by "seongjinyoon (via GitHub)" <gi...@apache.org>.
seongjinyoon commented on PR #4143:
URL: https://github.com/apache/texera/pull/4143#issuecomment-3712941255
@chenlica After some investigation, I found taht MockTexeraDB has a bug that does not allow the test cases to pass when running the full test suite. I suggest removing the test cases for this PR, investigate the issue deeper and fix it, then add the test cases back.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(backend): allow users with read access level to revoke their own access on shared workflows [texera]
Posted by "chenlica (via GitHub)" <gi...@apache.org>.
chenlica commented on PR #4143:
URL: https://github.com/apache/texera/pull/4143#issuecomment-3701065190
@aicam Please review it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(backend): allow users with read access level to revoke their own access on shared workflows [texera]
Posted by "seongjinyoon (via GitHub)" <gi...@apache.org>.
seongjinyoon commented on PR #4143:
URL: https://github.com/apache/texera/pull/4143#issuecomment-3700857224
@chenlica I have added test cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(backend): allow users with read access level to revoke their own access on shared workflows [texera]
Posted by "chenlica (via GitHub)" <gi...@apache.org>.
chenlica commented on PR #4143:
URL: https://github.com/apache/texera/pull/4143#issuecomment-3698138798
Thanks for the PR. A few comments:
1) In the video the user clicked the share button for the computing unit. If so, I think it should show something related to a workflow.
2) Can we add some test cases to replace manual testing?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(backend): allow users with read access level to revoke their own access on shared workflows [texera]
Posted by "chenlica (via GitHub)" <gi...@apache.org>.
chenlica commented on PR #4143:
URL: https://github.com/apache/texera/pull/4143#issuecomment-3713091182
@carloea2 Is it related to a recent finding you have related to MockTexeraDB?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(backend): allow users with read access level to revoke their own access on shared workflows [texera]
Posted by "carloea2 (via GitHub)" <gi...@apache.org>.
carloea2 commented on PR #4143:
URL: https://github.com/apache/texera/pull/4143#issuecomment-3713280337
> @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 to investigate what is the reason.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(backend): allow users with read access level to revoke their own access on shared workflows [texera]
Posted by "seongjinyoon (via GitHub)" <gi...@apache.org>.
seongjinyoon commented on PR #4143:
URL: https://github.com/apache/texera/pull/4143#issuecomment-3698178411
> ### 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:**
>
> * Updated `revokeAccess()` method in `WorkflowAccessResource.scala` to allow users to revoke their own access regardless of privilege level (READ or WRITE).
> * Added owner protection which prevents workflow owners from revoking their own access to avoid orphaned workflows.
>
> **Before:**
>
> * Backend requires WRITE privilege for self-revocation.
> * READ users received error when revoking their own access.
>
> **After:**
>
> * READ users can revoke their own access to a shared workflow (leave shared workflows).
> * Owners cannot revoke their own access (prevent orphaned workflows).
>
> **Demo:**
>
> Screen.Recording.2025-12-29.at.6.13.00.PM.mov
> ### Any related issues, documentation, discussions?
> Fixes #4141.
>
> ### How was this PR tested?
> Manually tested.
>
> ### Was this PR authored or co-authored using generative AI tooling?
> No.
> Thanks for the PR. A few comments:
>
> 1. In the video the user clicked the share button for the computing unit. If so, I think it should show something related to a workflow.
> 2. Can we add some test cases to replace manual testing?
For 1. In the video, the user clicks on the share button for the workflow.
For 2. I will add test cases for this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(backend): allow users with read access level to revoke their own access on shared workflows [texera]
Posted by "aicam (via GitHub)" <gi...@apache.org>.
aicam merged PR #4143:
URL: https://github.com/apache/texera/pull/4143
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org