Repository navigation
Back each directory group with a core group - #40
Merged
Merged
Conversation
A host in a directory group now gets everything its core group grants: snapins, printers, modules and power schedules (fogproject ADR 0038). Joining one also writes the OU, and the domain when the group has one, onto the host's ADOU and ADDomain. That write is a deliberate exception to ADR 0038's "a group grants, it does not copy" (GH-1879 follow-up). - directoryOUs.doGroupID names the backing core group. Schema step 5 adds it; step 6 creates a core group per directory group, copies directoryOUAssoc into groupMembers, writes each member's OU and domain, then drops directoryOUAssoc; step 7 adds the CASCADE foreign key. - DirectoryGroups::save() creates the core group, keeps its name in step, and saves hosts through it. A name that is too long for groupName (varchar 50) or already taken ends in " #<id>". - AddDirectoryGroupsMembership listens to core's ASSOCIATION_UPDATED (fogproject #1886). Whichever page or route adds a host to a directory group's core group, the host leaves every other directory group and takes the new OU. Leaving changes nothing on the host. - The host tab, mass edit and registration join through the core group. Deleting a directory group deletes its core group; deleting the core group deletes the directory group. - DirectoryGroupsChangeItems is removed: it set ADOU at legacy client check-in, and the OU is on the host itself now. The API no longer lists directorygroupsassociation, and groupID is server-owned. - plugin-id-columns-are-classified now also reads ALTER TABLE ... ADD COLUMN, so an id column added by a later step cannot skip classification. It failed on doGroupID until the pin was added. Live-tested on the local 1.6 webroot: upgrade from v1.6.25 data, core Group page add, host Groups tab add, mass edit set and clear, new group, rename, and both deletes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 16, 2026
Merged
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.
Follow-up to FOGProject/fogproject#1879. Needs FOGProject/fogproject#1886 (the
ASSOCIATION_UPDATEDevent and thedirectoryOUs.doGroupIDforeign key).What changes for an admin
Schema (appended, steps 5-7)
directoryOUs.doGroupID.directoryOUAssocintogroupMembers, write each member's OU and domain, then dropdirectoryOUAssoc.groups.A core group name that is longer than 50 characters, or already taken, ends in
#<id>.Removed
DirectoryGroupsChangeItems. It set ADOU at legacy-client check-in. The OU is on the host itself now.directorygroupsassociationfrom the API class list.groupIDis server-owned.Tests
tests/directorygroups-membership.test.php: both event directions, last-wins on a double join, who leaves which group, and the step order. It fails with the planner changed to first-wins.plugin-id-columns-are-classifiednow readsALTER TABLE ... ADD COLUMNtoo. Before, a column added by a later step was invisible to it. It failed ondoGroupIDuntil the pin was added.sh tests/run-all.sh: 19 passed.Live test (local 1.6 webroot)
The upgrade ran on rows written by the released v1.6.25 code. Every path in "What changes" behaved as described. The host list on the directory group page now shows the same associated/dissociated marks as the core Group page. The test rows were removed afterward.
🤖 Generated with Claude Code