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
+3 -6
View File
@@ -124,10 +124,7 @@ impl SystemScope {
.allowed_script_profiles
.as_deref()
.is_none_or(|v| v == [rmm_domain::jobs::PrivilegedScriptProfile::FullMaintenanceV1])
&& rmm_domain::jobs::valid_windows_update_limit(
self.windows_update_max_runtime_seconds,
self.allowed_script_profiles.as_deref(),
)
&& rmm_domain::jobs::valid_windows_update_limit(self.windows_update_max_runtime_seconds)
&& (1..=120).contains(&self.max_runtime_seconds)
}
fn permits(
@@ -184,11 +181,11 @@ impl SystemScope {
Action::RunScript { .. } => {
allow_scripts
&& job.action.full_maintenance()
&& self.allowed_script_profiles.as_ref().is_some_and(|v| {
&& (self.allowed_script_profiles.as_ref().is_some_and(|v| {
v.contains(
&rmm_domain::jobs::PrivilegedScriptProfile::FullMaintenanceV1,
)
})
}) || (self.windows_update_max_runtime_seconds.is_some() && job.action.is_windows_update_template()))
&& job.action.validate()
&& job
.action