mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-25 08:00:59 +00:00
docs: correct the execution_mode and custom-path scoping rationale
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6409,8 +6409,8 @@ fn downgrade_cloned_app_policy(policy: &mut serde_json::Value, authed: &ApiAuthe
|
||||
"on_behalf_of_email".to_string(),
|
||||
serde_json::Value::String(authed.email.clone()),
|
||||
);
|
||||
// A policy missing `execution_mode` counts as anonymous: the safe reading, since no
|
||||
// reader here decides what it would have meant.
|
||||
// A policy without `execution_mode` gets one too: `Policy` declares no serde default
|
||||
// for the field, so such a row does not read back as a policy until something writes it.
|
||||
let anonymous = obj
|
||||
.get("execution_mode")
|
||||
.and_then(|m| m.as_str())
|
||||
|
||||
@@ -19,8 +19,8 @@ lazy_static::lazy_static! {
|
||||
}
|
||||
|
||||
/// Whether an app's custom path names it within its workspace rather than instance-wide.
|
||||
/// Every site that stores or resolves one must agree: a path stored under a narrower scope
|
||||
/// than the resolver's makes two apps answer the same public URL.
|
||||
/// A path stored under a narrower scope than the one its resolver applies leaves two apps
|
||||
/// answering the same public URL, so storage and resolution must decide it the same way.
|
||||
pub fn custom_path_is_workspace_scoped() -> bool {
|
||||
*crate::worker::CLOUD_HOSTED || APP_WORKSPACED_ROUTE.load(std::sync::atomic::Ordering::Relaxed)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user