When upgrading mod-permissions older than
MODPERMS-157 / version 6.0.0, the admin user could not have been assigned any of the new assignment permissions as these were not present before version 6.0.0 (and dummy permissions can not be assigned to a user).
If the admin user is not getting this permission, then tenant inits in mod-search or other might fail during install(upgrade), because it will not have permission to add new permissions to its system user. Alternatively, this can be fixed by adding modulePermissions: okapi.perms.assign.immutable to that tenant init handler.
For this reason, mod-permissions, should add additional assignment permissions for the supertenant admin user and tenant-level admin users. Mod-permissions does not have a notion of an admin user, but can deduce this based on existing permissions:
1. users that already has okapi.all -> gain perms.users.assign.okapi, perms.users.assign.immutable and perms.users.assign.mutable
2. users that already have perms.all -> gain perms.users.assign.immutable and perms.users.assign.mutable