fix(client) authCheck: can not connect via web sockets when auth disabled (#160)

This commit is contained in:
coderaiser 2018-04-02 10:57:46 +03:00
parent 31737ec68f
commit f248e29405
5 changed files with 0 additions and 15 deletions

View file

@ -116,9 +116,6 @@ function initSocket() {
}
function authCheck(socket) {
if (!config('auth'))
return;
socket.emit('auth', config('username'), config('password'));
socket.on('reject', () => {

View file

@ -105,9 +105,6 @@ CloudCmd.EditFile = function EditFileProto(callback) {
}
function authCheck(spawn) {
if (!config('auth'))
return;
spawn.emit('auth', config('username'), config('password'));
spawn.on('reject', () => {
Dialog.alert(TITLE, 'Wrong credentials!');

View file

@ -118,9 +118,6 @@ function ConsoleProto() {
}
function authCheck(spawn) {
if (!config('auth'))
return;
spawn.emit('auth', config('username'), config('password'));
spawn.on('reject', () => {

View file

@ -77,9 +77,6 @@ function OperationProto(operation, data) {
const accept = wraptile(ok);
const alertDialog = wraptile(Dialog.alert);
if (!config('auth'))
return ok(spawn);
spawn.on('accept', accept(spawn));
spawn.on('reject', alertDialog (TITLE, 'Wrong credentials!'));
spawn.emit('auth', config('username'), config('password'));

View file

@ -91,9 +91,6 @@ function create(callback) {
}
function authCheck(spawn) {
if (!config('auth'))
return;
spawn.emit('auth', config('username'), config('password'));
spawn.on('reject', () => {