Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Config: Set existing user as default for read-only storages (#6318)
The `create_profile` command would only set a default user for storage backends that are not read-only. The reason is that the default user is first created and so needs to be stored, which is not possible by definition for read-only storages. This would lead to problems elsewhere, however, as a lot of the API assumes that a default user is set. This would make read-only storage backends, such as `core.sqlite_zip` effectively useless. Since `core.sqlite_zip` profiles mount an export archive, which by definition should always include at least a single user, instead of creating a new one, the default user can be one of the users already part of the storage. Note that for certain edge-cases, such as in testing where the archive doesn't contain anything, it is possible that no user is present, but this should not happen in real use-cases.
- Loading branch information