Qualify tenant-scoped bootstrap rotation and fresh Windows scripting

This commit is contained in:
2026-11-17 16:19:08 +01:00
parent 81fcd9c8f8
commit fbd24b6d75
26 changed files with 877 additions and 118 deletions
+4 -2
View File
@@ -116,8 +116,9 @@ impl Settings {
.action
.valid_job_limits(job.max_runtime_seconds, job.max_output_bytes)
&& job.max_runtime_seconds <= job.action.windows_system_runtime_limit(self.max_runtime_seconds, self.windows_update_max_runtime_seconds)
&& self.allowed_script_profiles.as_deref()
&& (self.allowed_script_profiles.as_deref()
== Some(&[rmm_domain::jobs::PrivilegedScriptProfile::FullMaintenanceV1])
|| (self.windows_update_max_runtime_seconds.is_some() && job.action.is_windows_update_template()))
}
fn permits_reboot(&self, job: &JobPayload) -> bool {
self.schema_version == 4
@@ -146,7 +147,8 @@ impl Settings {
|v| v == [rmm_domain::jobs::PrivilegedScriptProfile::FullMaintenanceV1]
)
&& (self.schema_version == 4 || !self.allow_reboot)
&& rmm_domain::jobs::valid_windows_update_limit(self.windows_update_max_runtime_seconds, self.allowed_script_profiles.as_deref())
&& (self.schema_version >= 3 || self.windows_update_max_runtime_seconds.is_none())
&& rmm_domain::jobs::valid_windows_update_limit(self.windows_update_max_runtime_seconds)
&& (1..=120).contains(&self.max_runtime_seconds)
&& self.allowed_services.len() <= 16,
"SYSTEM_POLICY_PROFILE"