disable login if Nextcloud is running

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2021-12-30 14:57:49 +01:00
parent 892590275f
commit 0010a6cfa3
3 changed files with 27 additions and 9 deletions

View file

@ -5,13 +5,18 @@
<div class="login">
<img src="/img/logo-blue.svg" style="margin-left: auto;margin-right: auto;display: block;">
<h1>Nextcloud AIO Login</h1>
<p>Log in using your Nextcloud AIO password. If you don't have it, you can also use the automatic login from your Nextcloud.</p>
<form method="POST" action="/api/auth/login">
<input type="text" name="password" placeholder="Password" />
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input type="submit" class="button" value="Login" />
</form>
{% if is_login_allowed == true %}
<p>Log in using your Nextcloud AIO password.</p>
<form method="POST" action="/api/auth/login">
<input type="text" name="password" placeholder="Password" />
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input type="submit" class="button" value="Login" />
</form>
{% else %}
<p>The login is blocked since Nextcloud is running. Please use the automatic login from your Nextcloud.<br><br>
You can unblock the login by running 'sudo docker stop nextcloud-aio-apache'.</p>
{% endif %}
</div>
</div>
{% endblock %}