diff --git a/src/lib.rs b/src/lib.rs index 1254200..65919fd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -99,9 +99,7 @@ where let mut security_context = security_context_option.unwrap_or_default(); match validation_request.settings.run_as_user.rule { Rule::MustRunAs => { - if validation_request.settings.run_as_user.overwrite - || security_context.run_as_user().is_none() - { + if validation_request.settings.run_as_user.overwrite { let default_user_id = validation_request.settings.run_as_user.ranges[0].min; security_context.set_run_as_user(Some(default_user_id)); return Ok(Some(security_context)); @@ -143,9 +141,7 @@ where let mut security_context = security_context_option.unwrap_or_default(); match validation_request.settings.run_as_group.rule { Rule::MustRunAs => { - if validation_request.settings.run_as_group.overwrite - || security_context.run_as_group().is_none() - { + if validation_request.settings.run_as_group.overwrite { let default_group_id = validation_request.settings.run_as_group.ranges[0].min; security_context.set_run_as_group(Some(default_group_id)); return Ok(Some(security_context));