Admin user lost all rights - nothing working after container upgrade to 16.4.0

Hi - I just upgraded a bare xwiki from 15 to 16.4.0 - and the distribution wizard allowed me to install a standard flavor.

This is the docker containerized version with a postgres 15.5 db.

Bizarrely this seems to have wiped out the admin rights on my user, which has left the site unusable. Thanfully there was nothing on it, but it’s a bit worrying.

All pages now just give a bunch of permission errors such as

org.xwiki.rendering.macro.MacroExecutionException: The execution of the [velocity] script macro is not allowed in [xwiki:XWiki.ConfigurableClassMacros]. Check the rights of its last author or the parameters if it’s rendered from another script.

Anybody know what’s up here?
What are best practices here - should I create a special non-personal admin user to ‘own’ the system pages and login as them when installing things?
I plan on switching to LDAP pretty soon, is that possible as docu mentions we can’t mix authentication?

I think I have two alternatives to get running:

  • Is it possible to restore all permissions to the admin user that installed the default flavour so that pages actually work?
    • Bear in mind I can’t use the admin interface any more!
    • I can use psql and admin the postgres (15.5) database directly.

or (this is what I’m currently trying)

  • Could I delete stuff to competely reset my instance?
    • Drop xwiki and recreate database
    • rm -rf /usr/local/xwiki/data folder and tomcat cache

Apparently as far as I understand this issue something has broken the selection of the wiki owner. If the wiki owner has no programming rights, all plugins stop working - even the admin gui.
The thing is, you have to change the owner via the gui - which is not working.

I found myself a few times in exact that spot when testing exports and imports of whole wikis for migrations.

Even when using the superadmin you can’t change ownership via the gui, as the solution requires you to use the gui that is not working.

I sadly have no idea if there is any other way to change ownership to a working user (for example the superadmin) via the command line or similar.

Thanks - yeah that’s exactly what happened. Think I’ll be rather careful around this.

The complete reset worked fine, so I’m up and running again. I’ve chosen to use a dedicated admin user for installs, I’m hoping the wiki will outlast me in my org!