kunwp1 commented on code in PR #9275:
URL: https://github.com/apache/texera/pull/9275#discussion_r4459611578
##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/user/quota/UserQuotaResource.scala:
##########
@@ -203,7 +205,16 @@ class UserQuotaResource {
@DELETE
@Path("/deleteCollection/{eid}")
- def deleteCollection(@PathParam("eid") eid: Integer): Unit = {
+ @RolesAllowed(Array("REGULAR", "ADMIN"))
+ def deleteCollection(
+ @PathParam("eid") eid: Integer,
+ @Auth current_user: SessionUser
+ ): Unit = {
+ WorkflowExecutionsResource.validateUserCanAccessExecutions(
+ current_user.getUid,
+ Seq(eid),
+ requireWrite = true
+ )
Review Comment:
The quota page lists the executions the caller ran
(`WORKFLOW_EXECUTIONS.UID`), but this check asks for write access on the
execution's workflow. The two differ once a user's access is downgraded or
revoked. The execution still counts against their quota and still shows on the
page, but deleting it returns 401, which also logs them out. Checking that the
caller created the execution would match what the page lists.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]