The GitHub Actions job "Required Checks" on 
texera.git/backport/9325-return-403-instead-of-401-when-a-user-la-v1.3 has 
failed.
Run started by GitHub user github-actions[bot] (triggered by 
github-actions[bot]).

Head commit for run:
aebaadc60f249696b5e00d96d40a0a5c124d65ca / Meng Wang <[email protected]>
fix(amber): return 403 instead of 401 when a user lacks access to an execution 
(#9325)

### What changes were proposed in this PR?

`validateUserCanAccessExecutions` now throws `ForbiddenException` (403)
instead of a 401. The frontend reads any 401 on an authenticated request
as an expired session, so a read-only user who bookmarked, renamed or
deleted an execution was logged out. With a 403 they stay logged in.

Bookmark puts its icon back on a refusal. Rename and delete have no
error handler, so they fail without a message; that is left out of this
PR to keep it small.

### Any related issues, documentation, discussions?

Closes #9324.

### How was this PR tested?

Added a read-only bookmark case to `WorkflowExecutionsResourceSpec`, and
the refusal cases now assert 403. Ran `sbt
"WorkflowExecutionService/testOnly *UserQuotaResourceSpec
*WorkflowExecutionsResourceSpec"`: 84 of 85 pass. The other one, the
per-user warehouse case of `retrieveWorkflowRuntimeStatistics`, fails
the same way locally on unmodified `main`. Putting the 401 back fails
the four cases this PR touches.

Not clicked through in a running instance.

### Was this PR authored or co-authored using generative AI tooling?

(backported from commit 312a0cefc54ed3bc6b810dfdb07589df1b872e99)

Generated-by: Claude Code (claude-opus-5-5)

Report URL: https://github.com/apache/texera/actions/runs/41986089715

With regards,
GitHub Actions via GitBox

Reply via email to