1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Ensure auth-tokens are removed when no user is specified in settings

This commit is contained in:
Nick O'Leary 2017-01-21 23:49:20 +00:00
parent 540472a093
commit 3fdeb38bb7
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -102,7 +102,7 @@ RED.settings = (function () {
url: 'settings',
success: function (data) {
setProperties(data);
if (RED.settings.user && RED.settings.user.anonymous) {
if (!RED.settings.user || RED.settings.user.anonymous) {
RED.settings.remove("auth-tokens");
}
console.log("Node-RED: " + data.version);