From 5d3be7cde21a85fa58cbd053e7cac06ac617a4c1 Mon Sep 17 00:00:00 2001 From: Kristoffer Walker Date: Thu, 27 Oct 2016 05:52:13 -0400 Subject: [PATCH] Remove channel specific logic from base Controller class modified: lib/controllers/controller.js --- lib/controllers/controller.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lib/controllers/controller.js b/lib/controllers/controller.js index bd3b46d..5c7b5ad 100644 --- a/lib/controllers/controller.js +++ b/lib/controllers/controller.js @@ -11,10 +11,6 @@ class Controller { getChannel(req) { if (this.isAdminRequest(req)) { - if (this.type === 'channel') { - return Promise.resolve(null); - } - const channelId = (req.query || {}).channel || (req.body || {}).channel; if (channelId) { @@ -41,11 +37,6 @@ class Controller { const channel = req.identity.channel; if (channel) { - if (this.type === 'channel' && req.params.id && channel.id !== req.params.id) { - return Promise.reject(Boom.forbidden( - 'Access to the requested channel is forbidden' - )); - } return Promise.resolve(channel); }