Skip to content

retrieveWorkflowRuntimeStatistics is the only WorkflowExecutionsResource endpoint missing @RolesAllowed / @Auth #6977

Description

@mengw15

What happened?

In WorkflowExecutionsResource (WorkflowExecutionsResource.scala:662-665), retrieveWorkflowRuntimeStatistics (GET /executions/{wid}/stats/{eid}) declares neither @RolesAllowed nor an @Auth sessionUser parameter. Every other endpoint in the class does:

  • @GET/{wid}/latest, /{wid}/interactions/{eid}, /{wid}
  • @PUT/set_execution_bookmarks, /delete_executions
  • @POST/update_execution_name

All six carry @RolesAllowed(Array("REGULAR", "ADMIN")) + @Auth sessionUser. The class has no class-level @RolesAllowed either, so this one handler is inconsistent with the rest. Looks like an oversight when it was added.

Fix: add @RolesAllowed(Array("REGULAR", "ADMIN")) and an @Auth sessionUser: SessionUser parameter to match the sibling endpoints.

How to reproduce?

Compare the annotations on retrieveWorkflowRuntimeStatistics (662-665) against the other handlers in the same class — it is the only one without @RolesAllowed / @Auth.

Version

1.1.0-incubating (Pre-release/Master)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions