Do user.otp_secret check properly

This commit is contained in:
Thomas M Steenholdt 2018-08-13 01:30:56 -02:00
parent 0ac33aa3c4
commit fe4616d609

View File

@ -88,7 +88,7 @@
<p><strong>Beware: This could compromise security!</strong></p> <p><strong>Beware: This could compromise security!</strong></p>
</div> </div>
<div class="box-footer"> <div class="box-footer">
<button type="button" class="btn btn-flat btn-warning button_otp_disable" id="{{ user.username }}" {% if user.otp_secret == "" %}disabled{% endif %}>Disable Two Factor Authentication</button> <button type="button" class="btn btn-flat btn-warning button_otp_disable" id="{{ user.username }}" {% if not user.otp_secret %}disabled{% endif %}>Disable Two Factor Authentication</button>
</div> </div>
</div> </div>
{% endif %} {% endif %}