forked from shaba/openuds
* 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
|
||||||
|
|
||||||
|
self.cache._cache.flush_all() # On start, ensures that cache is empty to avoid surprises
|
||||||
|
|
||||||
Storage.__init__(self, *args, **kwargs)
|
Storage.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@ -151,8 +153,9 @@ class FileStorage(Storage):
|
|||||||
self._removeFromCache(name)
|
self._removeFromCache(name)
|
||||||
|
|
||||||
def exists(self, name):
|
def exists(self, name):
|
||||||
|
logger.debug('Called exists for {}')
|
||||||
try:
|
try:
|
||||||
self._dbFileForReadOnly(name)
|
self._dbFileForReadOnly(name).uuid
|
||||||
return True
|
return True
|
||||||
except DBFile.DoesNotExist:
|
except DBFile.DoesNotExist:
|
||||||
return False
|
return False
|
||||||
|
@ -83,6 +83,8 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<input type="hidden" name="{{ form.authenticator.name }}" id="id_{{ form.authenticator.name }}" value="{{ form.fields.authenticator.choices.0.0 }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<button class="btn btn-lg btn-primary btn-block" type="submit"><span class="fa fa-sign-in"></span> {% trans 'Sign in' %}</button>
|
<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">
|
<div id="nonStandard" style="display: none">
|
||||||
|
@ -103,6 +103,8 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<input type="hidden" name="{{ form.authenticator.name }}" id="id_{{ form.authenticator.name }}" value="{{ form.fields.authenticator.choices.0.0 }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="ui vertical animated blue small button signin">
|
<div class="ui vertical animated blue small button signin">
|
||||||
<div class="visible content"> {% trans "Log In" %} </div>
|
<div class="visible content"> {% trans "Log In" %} </div>
|
||||||
|
Loading…
Reference in New Issue
Block a user