mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-27 16:02:43 +00:00
feat: restricted job tokens (job_token_scopes on scripts and flows)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f74113c75a
commit
06a5d73bb8
@@ -7637,7 +7637,7 @@ async fn clone_scripts(
|
||||
dedicated_worker, ws_error_handler_muted, priority, timeout,
|
||||
delete_after_use, delete_after_secs, restart_unless_cancelled, concurrency_key,
|
||||
visible_to_runner_only, auto_kind, codebase, has_preprocessor,
|
||||
on_behalf_of, on_behalf_of_email, assets, modules
|
||||
on_behalf_of, on_behalf_of_email, assets, modules, job_token_scopes
|
||||
)
|
||||
SELECT
|
||||
$1, hash, path, parent_hashes, summary, description, content,
|
||||
@@ -7669,7 +7669,7 @@ async fn clone_scripts(
|
||||
UNION ALL
|
||||
SELECT 1 FROM password p WHERE p.email = on_behalf_of
|
||||
AND p.super_admin))
|
||||
END, on_behalf_of_email, assets, modules
|
||||
END, on_behalf_of_email, assets, modules, job_token_scopes
|
||||
FROM script
|
||||
WHERE workspace_id = $2"#,
|
||||
target_workspace_id,
|
||||
@@ -8027,7 +8027,8 @@ async fn clone_flows(
|
||||
workspace_id, path, summary, description, value, edited_by, edited_at,
|
||||
archived, schema, extra_perms, dependency_job, tag,
|
||||
ws_error_handler_muted, dedicated_worker, timeout, visible_to_runner_only,
|
||||
concurrency_key, versions, on_behalf_of, on_behalf_of_email, lock_error_logs
|
||||
concurrency_key, versions, on_behalf_of, on_behalf_of_email, lock_error_logs,
|
||||
job_token_scopes
|
||||
)
|
||||
SELECT $2, path, summary, description, value, edited_by, edited_at,
|
||||
archived, schema, extra_perms, NULL, tag,
|
||||
@@ -8053,7 +8054,7 @@ async fn clone_flows(
|
||||
UNION ALL
|
||||
SELECT 1 FROM password p WHERE p.email = on_behalf_of
|
||||
AND p.super_admin))
|
||||
END, on_behalf_of_email, lock_error_logs
|
||||
END, on_behalf_of_email, lock_error_logs, job_token_scopes
|
||||
FROM flow
|
||||
WHERE workspace_id = $1",
|
||||
source_workspace_id,
|
||||
|
||||
Reference in New Issue
Block a user