mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
fix(client) authCheck: can not connect via web sockets when auth disabled (#160)
This commit is contained in:
parent
31737ec68f
commit
f248e29405
5 changed files with 0 additions and 15 deletions
|
|
@ -116,9 +116,6 @@ function initSocket() {
|
|||
}
|
||||
|
||||
function authCheck(socket) {
|
||||
if (!config('auth'))
|
||||
return;
|
||||
|
||||
socket.emit('auth', config('username'), config('password'));
|
||||
|
||||
socket.on('reject', () => {
|
||||
|
|
|
|||
|
|
@ -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!');
|
||||
|
|
|
|||
|
|
@ -118,9 +118,6 @@ function ConsoleProto() {
|
|||
}
|
||||
|
||||
function authCheck(spawn) {
|
||||
if (!config('auth'))
|
||||
return;
|
||||
|
||||
spawn.emit('auth', config('username'), config('password'));
|
||||
|
||||
spawn.on('reject', () => {
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
|
|
|
|||
|
|
@ -91,9 +91,6 @@ function create(callback) {
|
|||
}
|
||||
|
||||
function authCheck(spawn) {
|
||||
if (!config('auth'))
|
||||
return;
|
||||
|
||||
spawn.emit('auth', config('username'), config('password'));
|
||||
|
||||
spawn.on('reject', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue