Skip to content

Let the duration policy take -1 for never delete - #38

Merged
rodchristiansen merged 1 commit into
mainfrom
feature/admx-duration-text
Oct 8, 2026
Merged

rodchristiansen merged 1 commit into
mainfrom
feature/admx-duration-text

Conversation

@rodchristiansen

Copy link
Copy Markdown
Contributor

DefaultPolicyDurationDays was an ADMX decimal, which is unsigned, so the policy could not express -1 (never delete), which configs use as duration_days: -1.

  • The element is now text (REG_SZ), same valueName and element id DefaultPolicyDurationDays_Value. SettingsResolver already parses a REG_SZ whole number, and the engine treats any negative duration as never delete.
  • The ADML presentation is a textBox defaulting to 28, and the explain text says -1 = never delete.
  • Rule duration_days inside the Policies value already accepts -1; the test sample now uses it.
  • AdmxTests checks the element is text and that "-1" resolves as -1 from policy. README's settings table lists the REG_SZ form.

An ADMX decimal is unsigned, so the default rule's duration policy could not say
-1, which configs use to mean never delete. It is now a text element writing
REG_SZ, which the resolver already parses as a whole number. Rule durations in
the Policies value already accept -1; the test now covers both.
@rodchristiansen
rodchristiansen merged commit 5a567a6 into main Oct 8, 2026
1 check passed
@rodchristiansen
rodchristiansen deleted the feature/admx-duration-text branch October 8, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant