Skip to content

Conversation

@JoseSzycho
Copy link
Contributor

This PR introduces improved namespace validation logic for both ContactGroupMembership and ContactGroupMembershipRemoval resources. Specifically, it ensures that when a Contact uses a SubjectRef with APIGroup set to resourcemanager.miloapis.com, any associated membership or membership removal resource must be created in the same namespace as the referenced Contact.

This change enforces stricter scoping rules, improves organizational consistency, and prevents accidental misplacement or orphaning of membership and membership removal resources.

This commit adds validation to ensure that the namespace of the ContactGroupMembership matches the namespace of the related Contact when the Contact's SubjectRef is associated with the resourcemanager.miloapis.com API group. Two new test cases have been introduced to verify this behavior, covering both matching and mismatched namespace scenarios.
@JoseSzycho JoseSzycho requested a review from scotwells October 20, 2025 02:29
@joggrbot
Copy link
Contributor

joggrbot bot commented Oct 20, 2025

📝 Documentation Analysis

Joggr found 1 outdated docs in the pull request.

Autofix

Joggr opened 1 pull request(s) to fix the outdated docs.

Outdated

file reason confidence
docs/api/notification.md The code introduces new namespace validation for ContactGroupMembership and ContactGroupMembershipRemoval resources when the associated Contact has a SubjectRef API group of 'resourcemanager.miloapis.com', but the documentation does not mention this restriction, which could lead users to create resources that will be rejected by the system. 56.3%

✅ Latest commit analyzed: 1a3578c | Powered by Joggr

@JoseSzycho JoseSzycho requested a review from zachsmith1 October 20, 2025 02:29
@JoseSzycho
Copy link
Contributor Author

@mustela FYI.

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.

2 participants