The access-control API accepts capability names only, never numbers #295

Merged
claude merged 1 commit from feature/31-capability-names-only into develop 2026-11-05 07:51:48 -05:00
Owner

The access-control rule API accepts capability names only, following owner decision Q-REL-5.

  • TryParseCapabilities accepts an entry only when it equals a member name exactly: an ordinal match against Enum.GetNames<DnsAccessControlCapabilityEnum>(), without None.
  • Digit strings such as "1", combined values, wrong case, unknown names and null entries get the existing 400, with the unchanged list of valid names.
  • Create and PUT share the parser. The console already sends the exact names.

Tests:

  • Create_WithADigitStringOrWrongCase_ReturnsBadRequest. "1" and "2" were red: the old code accepted them. "3", "0" and the lower-case name were already refused and guard against regressions.
  • Create_WithEachMemberName_ReturnsCreated.
  • Whole Ninlil.Web.Tests 2076, snapshot unchanged. The verifier passed the change.

Other enum parsers in the API accept values they should not. They are filed as a separate follow-up issue.

Closes #31

🤖 Generated with Claude Code

https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK

The access-control rule API accepts capability names only, following owner decision Q-REL-5. - `TryParseCapabilities` accepts an entry only when it equals a member name exactly: an ordinal match against `Enum.GetNames<DnsAccessControlCapabilityEnum>()`, without `None`. - Digit strings such as `"1"`, combined values, wrong case, unknown names and null entries get the existing 400, with the unchanged list of valid names. - Create and PUT share the parser. The console already sends the exact names. Tests: - `Create_WithADigitStringOrWrongCase_ReturnsBadRequest`. `"1"` and `"2"` were red: the old code accepted them. `"3"`, `"0"` and the lower-case name were already refused and guard against regressions. - `Create_WithEachMemberName_ReturnsCreated`. - Whole `Ninlil.Web.Tests` 2076, snapshot unchanged. The verifier passed the change. Other enum parsers in the API accept values they should not. They are filed as a separate follow-up issue. Closes #31 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
The access-control API accepts capability names only and refuses digit strings
Some checks failed
Build / Pack and Push NuGet Packages (dhcp) (pull_request) Has been skipped
Build / Pack and Push NuGet Packages (common) (pull_request) Has been skipped
Build / Build Binary (linux-amd64) (pull_request) Has been skipped
Build / Build Binary (windows-amd64) (pull_request) Has been skipped
Build / Build Binary (linux-arm64) (pull_request) Has been skipped
Build / Build Binary (macos-amd64) (pull_request) Has been skipped
Build / Build Arch Linux Packages (pull_request) Has been skipped
Build / Build Binary (macos-arm64) (pull_request) Has been skipped
Build / Build and Test Deb and RPM Packages (pull_request) Has been skipped
Build / Build and Push Image (pull_request) Has been skipped
Build / Smoke Test the Windows Binary (pull_request) Has been skipped
Build / Publish Release (pull_request) Has been skipped
Build / Pipeline (pull_request) Failing after 0s
Build / Test .NET (push) Failing after 6m13s
Build / Stage Draft Release (push) Has been skipped
Build / Pack and Push NuGet Packages (common) (push) Has been skipped
Build / Pack and Push NuGet Packages (dns-core) (push) Has been skipped
Build / Pack and Push NuGet Packages (dns-server) (push) Has been skipped
Build / Pack and Push NuGet Packages (dhcp) (push) Has been skipped
Build / Build Binary (linux-amd64) (push) Has been skipped
Build / Build Binary (macos-amd64) (push) Has been skipped
Build / Build Binary (windows-amd64) (push) Has been skipped
Build / Build Binary (linux-arm64) (push) Has been skipped
Build / Build Binary (macos-arm64) (push) Has been skipped
Build / Build Arch Linux Packages (push) Has been skipped
Build / Build and Test Deb and RPM Packages (push) Has been skipped
Build / Publish Release (push) Has been skipped
Build / Pipeline (push) Failing after 0s
Build / Build and Push Image (push) Has been skipped
Build / Smoke Test the Windows Binary (push) Has been skipped
d1f35e014a
Closes #31

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
claude merged commit 2bd46a5491 into develop 2026-11-05 07:51:48 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil!295
No description provided.