1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

* Fixed Login with only one authenticator (not working before)

* Added cache flush on start for FileStorage to avoid problems
This commit is contained in:
Adolfo Gómez García 2016-04-27 06:59:34 +02:00
parent a250cf4aef
commit cbd9330907
3 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -83,6 +83,8 @@
{% endfor %}
</select>
</div>
{% else %}
<input type="hidden" name="{{ form.authenticator.name }}" id="id_{{ form.authenticator.name }}" value="{{ form.fields.authenticator.choices.0.0 }}">
{% endif %}
<button class="btn btn-lg btn-primary btn-block" type="submit"><span class="fa fa-sign-in"></span> {% trans 'Sign in' %}</button>
<div id="nonStandard" style="display: none">

View File

@ -103,6 +103,8 @@
{% endfor %}
</select>
</div>
{% else %}
<input type="hidden" name="{{ form.authenticator.name }}" id="id_{{ form.authenticator.name }}" value="{{ form.fields.authenticator.choices.0.0 }}">
{% endif %}
<div class="ui vertical animated blue small button signin">
<div class="visible content"> {% trans "Log In" %} </div>