gui, lib/config: Add GUI user and password notification (fixes #4703) (#6536)

This commit is contained in:
Jędrzej Kula
2020-06-02 12:08:22 +02:00
committed by GitHub
parent b033c36b31
commit 28d5c84599
6 changed files with 47 additions and 3 deletions
@@ -116,3 +116,28 @@
</div>
</div>
</notification>
<notification id="authenticationUserAndPassword">
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title"><span class="fas fa-bolt"></span>&nbsp;<span translate>GUI Authentication: Set User and Password</span></h3>
</div>
<div class="panel-body">
<p>
<span translate>Username/Password has not been set for the GUI authentication. Please consider setting it up.</span>
</p>
<p>
<span translate>If you want to prevent other users on this computer to access Syncthing and through it your files, consider setting up authentication.</span>
</p>
</div>
<div class="panel-footer">
<button type="button" class="btn btn-sm btn-default pull-right" ng-click="showSettings()">
<span class="fas fa-cog"></span>&nbsp;<span translate>Settings</span>
</button>
<button type="button" class="btn btn-sm btn-default pull-left" ng-click="dismissNotification('authenticationUserAndPassword')">
<span class="fa fa-check-circle"></span>&nbsp;<span translate>OK</span>
</button>
<div class="clearfix"></div>
</div>
</div>
</notification>
@@ -448,6 +448,10 @@ angular.module('syncthing.core')
&& (!guiCfg.user || !guiCfg.password)
&& guiCfg.authMode !== 'ldap'
&& !guiCfg.insecureAdminAccess;
if (guiCfg.user && guiCfg.password) {
dismissNotification('authenticationUserAndPassword');
}
}