Make delete from channel library a configurable permission
This commit is contained in:
parent
bec55bc3d1
commit
b0ff4d5ef0
4 changed files with 9 additions and 10 deletions
|
|
@ -893,7 +893,7 @@ Callbacks = {
|
|||
|
||||
generator: function (item, page, index) {
|
||||
var li = makeSearchEntry(item, false);
|
||||
if(hasPermission("playlistadd")) {
|
||||
if(hasPermission("playlistadd") || hasPermission("deletefromchannellib")) {
|
||||
addLibraryButtons(li, item.id, data.source);
|
||||
}
|
||||
$(li).appendTo($("#library"));
|
||||
|
|
|
|||
|
|
@ -1121,7 +1121,7 @@ function addLibraryButtons(li, id, source) {
|
|||
})
|
||||
.appendTo(btns);
|
||||
}
|
||||
if(CLIENT.rank >= 2 && source === "library") {
|
||||
if(hasPermission("deletefromchannellib") && source === "library") {
|
||||
$("<button/>").addClass("btn btn-xs btn-danger")
|
||||
.html("<span class='glyphicon glyphicon-trash'></span>")
|
||||
.click(function() {
|
||||
|
|
@ -1992,6 +1992,7 @@ function genPermissionsEditor() {
|
|||
makeOption("Lock/unlock playlist", "playlistlock", modleader, CHANNEL.perms.playlistlock+"");
|
||||
makeOption("Shuffle playlist", "playlistshuffle", standard, CHANNEL.perms.playlistshuffle+"");
|
||||
makeOption("Clear playlist", "playlistclear", standard, CHANNEL.perms.playlistclear+"");
|
||||
makeOption("Delete from channel library", "deletefromchannellib", standard, CHANNEL.perms.deletefromchannellib+"");
|
||||
|
||||
addDivider("Polls");
|
||||
makeOption("Open/Close poll", "pollctl", modleader, CHANNEL.perms.pollctl+"");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue