Until now, the contaxy initialization endpoint could only be called as long as no users existed in the DB. As the initialization creates the default admin user, this prevented the initialization to be called more than once. However, a new user could be registered before the initialization was called, which means the initialization could not be done after that.
This PR introduces two main changes:
A flag is saved in the DB which indicates whether initialization was already done. To save this flag, a concept of "system properties" was added, which can be used for additional properties of the systems that need to be persisted in the future.
All user login and registration endpoints now check if the system is already initialized. If that's not the case, a 403 error response is returned.
Until now, the contaxy initialization endpoint could only be called as long as no users existed in the DB. As the initialization creates the default admin user, this prevented the initialization to be called more than once. However, a new user could be registered before the initialization was called, which means the initialization could not be done after that.
This PR introduces two main changes: