Skip to content

Policy GET operations omit UserClass parameter in Get-TargetResourceHelper #108

@coderabbitai

Description

@coderabbitai

Problem

In source/Modules/DhcpServerDsc.OptionValueHelper/Public/Get-TargetResourceHelper.ps1 around lines 119-145, the Get-DhcpServerv4OptionValue calls for both scope-level and server-level policy lookups omit the UserClass parameter.

Impact

This can cause reading the wrong option value when multiple option values exist with different user classes, as the function cannot disambiguate between class-scoped values.

Expected Fix

Both policy lookup branches (with and without ScopeId) should include UserClass parameter in their parameters hashtables when calling Get-DhcpServerv4OptionValue.

Affected Code Location

  • File: source/Modules/DhcpServerDsc.OptionValueHelper/Public/Get-TargetResourceHelper.ps1
  • Lines: 119-145 (Policy switch case)
  • Both if-ScopeId and else branches missing UserClass parameter

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThe issue is an enhancement request.help wantedThe issue is up for grabs for anyone in the community.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions