In Leihs version 6, the “admin” UI and API have been completely overhauled, along with deep conceptual changes to the management of users and groups in leihs. This enables massive improvements to the functionality that can now be configured using those system-wide users and groups, e.g., assignment of Inventory-Pool roles, Delegations and Entitlement-Groups.
Please make sure to read and understand the following points before upgrading Leihs to version 6.
management: the previous setting “make all users customers of this inventory pool” has been replaced by a group-based assignment. Existing configuration is automatically migrated to use the new “All Users” group instead, but inventory pool managers might want to check this settings and perhaps select more appropriate groups.
management/admin: the users’
login field is now more strict about the allowed characters:
| are forbidden, existing fields containing forbidden characters will be removed.
admin: there are many “breaking changes” in general. If you’re running any integrations (API clients), we recommend to first try out the new version on a staging server. Because of the conceptual changes not everything can be simply ported, but in most cases if something does not work anymore, there is now a better way to do it. Please raise an issue if that is not the case for your scenario.
admin: new “system admin” role: settings that were previously only editable on the server by the
root user can now be set in the admin UI. to use this feature, manually promote at least 1 user account to “system admin”. This user account can then promote others in the admin UI.
1root@leihs-server:~# SYSADMIN_ID="00000000-0000-0000-0000-000000000000" \
2 psql -d leihs -c "UPDATE users SET is_admin=TRUE, is_system_admin=TRUE WHERE id='$SYSADMIN_ID';"
An alternative method that also starts from scratch with safe defaults is to remove all existing admins, then immediately create a new one in the web interface (when no admin exists, the web interface will only show a form which creates a system admin):
2 psql -d leihs -c "UPDATE users SET admin = false, system_admin=false;"
deployment: the inventory configuration needs to be adjusted. An example commit with these changes can be seen in the demo hosting repository.
- copy the declaration of
host_vars/yourhost.yml file for this host.
- make sure the
host_vars/yourhost.yml defines the correct external hostname, with no scheme, e.g.
- make sure that all the other values in
config/settings.yml are saved into the settings (see in DB or Admin UI). This will be the case if you have not changed the settings since the last deploy.
- remove the folder