feat(classic): add ebooks, user-groups, vpp scope support#203
Open
neilmartin83 wants to merge 6 commits into
Open
feat(classic): add ebooks, user-groups, vpp scope support#203neilmartin83 wants to merge 6 commits into
neilmartin83 wants to merge 6 commits into
Conversation
Classic API resources (e.g. ebook scope user groups) can return UUIDs instead of integers for scope item IDs. Typing NamedItem.ID and classicResourceXML.General.ID as int caused xml.Unmarshal to fail with strconv.ParseInt on any UUID value. Change both ID fields to string — no behaviour change for integer IDs, UUID IDs now round-trip correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
auto-merge was automatically disabled
May 11, 2026 13:55
Pull Request is not mergeable
JSS user groups (/JSSResource/usergroups) were missing from the Classic API manifest despite being referenced in scope limitations on policies, ebooks, and other scoped resources. Adds full CRUD + apply under classic-user-groups in the Classic - Administration help group. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ssignments Three related fixes for Classic API scope on resources like vpp assignments: - Add --user-group / --jss-user-group / --jss-user flags as valid target and exclusion items, routing to jss_user_groups / jss_users in scope XML. Previously only computer-group, mobile-device-group, building, department were accepted as target items. - Add NoSubsetPut to scope.Resource: resources without a /subset/Scope endpoint (vppassignments) now fetch the full document, splice in the updated scope at the byte level, and PUT the whole document back. - Fix flagToElemName for jss-user-group: child elements inside <jss_user_groups> are <user_group>, not <jss_user_group>. Wire no_subset_put through YAML manifest → ClassicResource → generator template → generated scope.Resource literal. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ebookstospecs/classic/resources.yaml— full CRUD,id/namelookups, scope support; generatesclassic_ebooks.gousergroupstospecs/classic/resources.yaml— full CRUD +apply; generatesclassic_user_groups.govppassignmentsandvppinvitations(both require full-doc PUT — no/subset/Scopeendpoint)NamedItem.IDandclassicResourceXML.General.IDtyped asint— Classic API returns UUID strings for scope item IDs; changed both tostring--user-group,--jss-user-group,--jss-useras valid scope target/exclusion flags, routing tojss_user_groups/jss_usersin scope XML (VPP-style user-based targeting)ResolveByListtoscope.Resource— resources without a/name/endpoint list all records and match by nameNoSubsetPuttoscope.Resource— resources without a/subset/ScopePUT endpoint fetch the full document, splice in the updated scope at byte level, and PUT the whole document backClassicResource→ generator template → generatedscope.ResourceliteralsTest plan
make testpassesbin/jamf-cli pro classic-ebooks scope get "<name with colon>"returns scope without parse errorbin/jamf-cli pro classic-user-groups listreturns JSS user group recordsbin/jamf-cli pro classic-vpp-assignments scope get "<name>"resolves name via list, returns scopebin/jamf-cli pro classic-vpp-assignments scope add "<name>" --user-group "<group>"adds tojss_user_groupstargetbin/jamf-cli pro classic-vpp-assignments scope remove "<name>" --user-group "<group>"removes fromjss_user_groupstargetbin/jamf-cli pro classic-vpp-invitations scope get/add/removeall work (live-tested against platform-nmartin ✓)🤖 Generated with Claude Code