Skip to content

Commit

Permalink
Remove channel specific logic from base Controller class
Browse files Browse the repository at this point in the history
	modified:   lib/controllers/controller.js
  • Loading branch information
kixxauth committed Oct 27, 2016
1 parent 122e9e4 commit 5d3be7c
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions lib/controllers/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
}

Expand Down

0 comments on commit 5d3be7c

Please sign in to comment.