From cbd93309071d80d15bb3f235634122e9198a69a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Wed, 27 Apr 2016 06:59:34 +0200 Subject: [PATCH] * Fixed Login with only one authenticator (not working before) * Added cache flush on start for FileStorage to avoid problems --- server/src/uds/core/util/FileStorage.py | 5 ++++- server/src/uds/templates/uds/html5/login.html | 2 ++ server/src/uds/templates/uds/semantic/login.html | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/server/src/uds/core/util/FileStorage.py b/server/src/uds/core/util/FileStorage.py index 15bd1c3bb..b35f70ab7 100644 --- a/server/src/uds/core/util/FileStorage.py +++ b/server/src/uds/core/util/FileStorage.py @@ -64,6 +64,8 @@ class FileStorage(Storage): self.cache = cache + self.cache._cache.flush_all() # On start, ensures that cache is empty to avoid surprises + Storage.__init__(self, *args, **kwargs) @@ -151,8 +153,9 @@ class FileStorage(Storage): self._removeFromCache(name) def exists(self, name): + logger.debug('Called exists for {}') try: - self._dbFileForReadOnly(name) + self._dbFileForReadOnly(name).uuid return True except DBFile.DoesNotExist: return False diff --git a/server/src/uds/templates/uds/html5/login.html b/server/src/uds/templates/uds/html5/login.html index 5e8af3375..86b04eae6 100644 --- a/server/src/uds/templates/uds/html5/login.html +++ b/server/src/uds/templates/uds/html5/login.html @@ -83,6 +83,8 @@ {% endfor %} + {% else %} + {% endif %} + {% else %} + {% endif %}
{% trans "Log In" %}