Support a desktop authentication mode.

This uses a single default user in the config database, which is
auto-logged into the app when SERVER_MODE = False. In this mode we
also hide/remove user-related functions in the UI.
This commit is contained in:
Dave Page committed 2015-01-26 15:20:28 +00:00
1 parent 10515431c7
commit 7c60fb3377
5 files changed
+93 -20

No files matched your search

+10 -5
View File
@@ -17,18 +17,23 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">File <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ url_for('security.change_password') }}">Change Password</a></li>
<li><a href="{{ url_for('utils.test') }}">Test URL</a></li>
<li><a href="{{ url_for('utils.ping') }}">Ping</a></li>
</ul>
</li>
</ul>
{% if config.SERVER_MODE %}
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><img src="{{ username | gravatar }}" width="18" height="18"> {{ username }} <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{ url_for('security.change_password') }}">Change Password</a></li>
<li class="divider"></li>
<li><a href="{{ url_for('security.logout') }}">Logout</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#"><img src="{{ username | gravatar }}" width="18" height="18"> {{ username }}</a></li>
</li>
</ul>
{% endif %}
</div>
</div>