From 6b15454a1892947ddcb94bc3bfd873902cc5a8ac Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 27 Jun 2014 12:50:39 +0000 Subject: [PATCH] enable edit button based on canEditFeatured, fixes #2411 --- static/js/folders.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/folders.js b/static/js/folders.js index 3b145483..64c16f8d 100644 --- a/static/js/folders.js +++ b/static/js/folders.js @@ -15,6 +15,7 @@ pandora.ui.folders = function(section) { ] || '').split(':')[0] == pandora.user.username, folderItems = section == 'items' ? 'Lists' : Ox.toTitleCase(section), folderItem = folderItems.slice(0, -1), + canEditFeatured = pandora.site.capabilities['canEditFeatured' + folderItems][pandora.user.level], initCounter = 0, loadCounter = 0; pandora.$ui.allItems = pandora.ui.allItems(section).appendTo(that); @@ -232,8 +233,7 @@ pandora.ui.folders = function(section) { })]; } } else if (folder.id == 'featured') { - //FIXME: this should use 'canEditFeatured' + section - if (pandora.user.level != 'admin') { + if (!canEditFeatured) { extras = [infoButton(Ox._('Featured ' + folderItems), Ox._('Featured {0} are selected public {0}, picked by the {1} staff.', [Ox._(folderItems.toLowerCase()), pandora.site.site.name]))];