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:
parent
a250cf4aef
commit
cbd9330907
@ -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
|
||||
|
@ -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">
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user