Fix: don't search channel library if rank < seeplaylist

This commit is contained in:
calzoneman 2014-09-04 20:53:18 -05:00
parent bc3f20198c
commit 71114b0060
4 changed files with 23 additions and 3 deletions

View file

@ -77,7 +77,8 @@ LibraryModule.prototype.handleSearchMedia = function (user, data) {
});
};
if (data.source === "yt" || !this.channel.is(Flags.C_REGISTERED)) {
if (data.source === "yt" || !this.channel.is(Flags.C_REGISTERED) ||
!this.channel.modules.permissions.canSeePlaylist(user)) {
searchYT();
} else {
db.channels.searchLibrary(this.channel.name, query, function (err, res) {