mirror of
https://github.com/calzoneman/sync.git
synced 2024-09-13 04:32:09 +00:00
Disallow cloning playlist if user doesn't have seeplaylist permission
This commit is contained in:
parent
952b2d66d3
commit
84a07030d0
@ -1211,6 +1211,12 @@ PlaylistModule.prototype.handleClonePlaylist = function (user, data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.channel.modules.permissions.canSeePlaylist(user)) {
|
||||||
|
return user.socket.emit("errorMsg", {
|
||||||
|
msg: "You are not allowed to save this playlist"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var pl = this.items.toArray();
|
var pl = this.items.toArray();
|
||||||
var self = this;
|
var self = this;
|
||||||
db.saveUserPlaylist(pl, user.getName(), data.name, function (err) {
|
db.saveUserPlaylist(pl, user.getName(), data.name, function (err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user