diff --git a/src/clientdb.js b/src/clientdb.js index 5e31ff6a4..0d9a8a00d 100644 --- a/src/clientdb.js +++ b/src/clientdb.js @@ -20,7 +20,6 @@ exports = module.exports = { TYPE_OAUTH: 'addon-oauth', TYPE_SIMPLE_AUTH: 'addon-simpleauth', TYPE_PROXY: 'addon-proxy', - TYPE_TEST: 'test', TYPE_ADMIN: 'admin' }; diff --git a/src/clients.js b/src/clients.js index 978dc0f0f..f1f0aa181 100644 --- a/src/clients.js +++ b/src/clients.js @@ -127,14 +127,6 @@ function getAllWithDetailsByUserId(userId, callback) { tmp.push(record); - return callback(null); - } else if (record.appId === constants.TEST_CLIENT_ID) { - record.name = constants.TEST_NAME; - record.location = constants.TEST_LOCATION; - record.type = 'test'; - - tmp.push(record); - return callback(null); } diff --git a/src/constants.js b/src/constants.js index 5c455355d..23476ceb7 100644 --- a/src/constants.js +++ b/src/constants.js @@ -7,10 +7,6 @@ exports = module.exports = { ADMIN_NAME: 'Settings', ADMIN_CLIENT_ID: 'webadmin', // oauth client id - ADMIN_APPID: 'admin', // admin appid (settingsdb) - - TEST_NAME: 'Test', - TEST_LOCATION: '', - TEST_CLIENT_ID: 'test' + ADMIN_APPID: 'admin' // admin appid (settingsdb) }; diff --git a/src/routes/oauth2.js b/src/routes/oauth2.js index d801a102b..0974d612f 100644 --- a/src/routes/oauth2.js +++ b/src/routes/oauth2.js @@ -207,7 +207,6 @@ function loginForm(req, res) { switch (result.type) { case clientdb.TYPE_ADMIN: return render(constants.ADMIN_NAME, '/api/v1/cloudron/avatar'); - case clientdb.TYPE_TEST: return render(constants.TEST_NAME, '/api/v1/cloudron/avatar'); case clientdb.TYPE_EXTERNAL: return render('External Application', '/api/v1/cloudron/avatar'); default: break; } @@ -375,7 +374,6 @@ var authorization = [ // TODO find a smarter way to test these if (appId === constants.ADMIN_CLIENT_ID) return next(); - if (appId === constants.TEST_CLIENT_ID) return next(); if (appId.indexOf('external-') === 0) return next(); if (appId.indexOf('addon-oauth-') === 0) appId = appId.slice('addon-oauth-'.length); if (appId.indexOf('proxy-') === 0) appId = appId.slice('proxy-'.length);