Qualify tenant-scoped bootstrap rotation and fresh Windows scripting
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user