fs: fix duplicated user repository objects
Because UserRepository objects contain stateful data (eg disk_usage),
the instances must be created and accessed via the
ArtifactRepository.get_user_repo() method, which handles a persistent
Before this patch however, the UserRepository.all() class method used
to create loose UserRepository objects on demand.
As a consequence, the disk_usage_refresh() method (called by the
periodic fs cleanup) was working on a temporary object, thus the
disk_usage parameter was not properly reset in the "real"
UserRepository object, creating inconsistencies between the content of
".disk_usage" and the value displayed on the web UI.
Fix UserRepository.all() to access the right instances.
Fixes: bd1c23893882 ("server: add filesystem api")
Signed-off-by: Julien Floret <firstname.lastname@example.org>
Acked-by: Thomas Faivre <email@example.com>