I moved the admin user and it didn’t add their group memberships back except for the XWikiAll group. I was trying to get the admin user to overlap with the user I ended up as when I’d login with LDAP. It seems like it actually deleted the admin user and then tried to recreate them (maybe???).
I found in the database backup script (mariadbdump creates sql) where a different user did have access to the admin group. It looked like to create membership there were 3 tables that would need updated, but rather than do that I just stole the permissions for the other user.
Sooooo. In my backup script (replacing usernames with anonymous descriptive names) I had
INSERT INTO `xwikistrings` VALUES
...
(-8529148758944720439,'member','XWiki.TheWikiOwner'),
...
(-7797394894295619824,'member','XWiki.AUserWithGroupAccess'),
(-6335560550745377651,'member','XWiki.AUserWithGroupAccess'),
(-4988087795715508939,'member','XWiki.AUserWithGroupAccess'),
(2311550985183023812,'member','XWiki.AUserWithGroupAccess'),
(3685452955967028165,'member','XWiki.AUserWithGroupAccess'),
(4857828472612607965,'member','XWiki.AUserWithGroupAccess'),
(6517588045560455647,'member','XWiki.AUserWithGroupAccess'),
...
These were all the group memberships for the user and my wiki owner. So just swapped the usernames and restored it. Now my owner was in all the groups the user was, but the user was only in XWikiAll. Once the wiki was working again I could just add the other user’s group memberships back.
INSERT INTO `xwikistrings` VALUES
...
(-8529148758944720439,'member','XWiki.AUserWithGroupAccess'),
...
(-7797394894295619824,'member','XWiki.TheWikiOwner'),
(-6335560550745377651,'member','XWiki.TheWikiOwner'),
(-4988087795715508939,'member','XWiki.TheWikiOwner'),
(2311550985183023812,'member','XWiki.TheWikiOwner'),
(3685452955967028165,'member','XWiki.TheWikiOwner'),
(4857828472612607965,'member','XWiki.TheWikiOwner'),
(6517588045560455647,'member','XWiki.TheWikiOwner'),