From 5ec22cdd23d31a5c2718e97d50cabd6c5682be0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Sun, 19 Jan 2014 13:55:32 +0100 Subject: [PATCH] BUGFIX: edit category button should only be shown to staff members --- .../javascripts/discourse/routes/discovery_route_builders.js | 2 +- app/assets/javascripts/discourse/routes/discovery_top_routes.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/routes/discovery_route_builders.js b/app/assets/javascripts/discourse/routes/discovery_route_builders.js index a2380088a..859f82993 100644 --- a/app/assets/javascripts/discourse/routes/discovery_route_builders.js +++ b/app/assets/javascripts/discourse/routes/discovery_route_builders.js @@ -61,7 +61,7 @@ function buildCategoryRoute(filter, params) { var opts = { category: model, filterMode: filterMode }; opts.noSubcategories = params && params.no_subcategories; - opts.canEditCategory = Discourse.User.current('staff'); + opts.canEditCategory = Discourse.User.currentProp('staff'); this.controllerFor('navigationCategory').setProperties(opts); return Discourse.TopicList.list(listFilter, params).then(function(list) { diff --git a/app/assets/javascripts/discourse/routes/discovery_top_routes.js b/app/assets/javascripts/discourse/routes/discovery_top_routes.js index 1ac90293c..e631674f4 100644 --- a/app/assets/javascripts/discourse/routes/discovery_top_routes.js +++ b/app/assets/javascripts/discourse/routes/discovery_top_routes.js @@ -50,7 +50,7 @@ Discourse.DiscoveryTopCategoryRoute = Discourse.Route.extend({ var opts = { category: model, filterMode: filterMode }; opts.noSubcategories = noSubcategories; - opts.canEditCategory = Discourse.User.current('staff'); + opts.canEditCategory = Discourse.User.currentProp('staff'); this.controllerFor('navigationCategory').setProperties(opts); return Discourse.TopList.find(filterMode).then(function(list) {