mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-19 00:02:03 +00:00
Remove admin requirement to cancel job selection (#4188)
This commit is contained in:
@@ -1462,7 +1462,6 @@ async fn cancel_selection(
|
||||
Path(w_id): Path<String>,
|
||||
Json(jobs): Json<Vec<Uuid>>,
|
||||
) -> error::JsonResult<Vec<Uuid>> {
|
||||
require_admin(authed.is_admin, &authed.username)?;
|
||||
|
||||
let mut tx = user_db.begin(&authed).await?;
|
||||
let jobs_to_cancel = sqlx::query_scalar!(
|
||||
|
||||
@@ -473,6 +473,7 @@
|
||||
selectedIds = []
|
||||
jobLoader?.loadJobs(minTs, maxTs, true, true)
|
||||
sendUserToast(`Canceled ${uuids.length} jobs`)
|
||||
isSelectingJobsToCancel = false
|
||||
}}
|
||||
loading={fetchingFilteredJobs}
|
||||
on:canceled={() => {
|
||||
@@ -496,6 +497,7 @@
|
||||
selectedIds = []
|
||||
jobLoader?.loadJobs(minTs, maxTs, true, true)
|
||||
sendUserToast(`Canceled ${uuids.length} jobs`)
|
||||
isSelectingJobsToCancel = false
|
||||
}}
|
||||
on:canceled={() => {
|
||||
isCancelingVisibleJobs = false
|
||||
|
||||
Reference in New Issue
Block a user