From e829482b7a09f575ae43fb23b16034850c99fb47 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 7 Mar 2014 14:31:05 -0500 Subject: [PATCH] #715 - hide New Collection button for non-admins --- dashboard-ui/collections.html | 2 +- dashboard-ui/scripts/moviecollections.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dashboard-ui/collections.html b/dashboard-ui/collections.html index 53c097ea45..6dc952ead7 100644 --- a/dashboard-ui/collections.html +++ b/dashboard-ui/collections.html @@ -16,7 +16,7 @@
- +
diff --git a/dashboard-ui/scripts/moviecollections.js b/dashboard-ui/scripts/moviecollections.js index ac5783483a..0b8e230ea0 100644 --- a/dashboard-ui/scripts/moviecollections.js +++ b/dashboard-ui/scripts/moviecollections.js @@ -67,6 +67,16 @@ LibraryBrowser.saveQueryValues('boxsets', query); + Dashboard.getCurrentUser().done(function(user) { + + if (user.Configuration.IsAdministrator) { + $('#btnNewCollection', page).removeClass('hide'); + } else { + $('#btnNewCollection', page).addClass('hide'); + } + + }); + Dashboard.hideLoadingMsg(); }); }