BUGFIX: edit category button should only be shown to staff members

This commit is contained in:
Régis Hanol 2014-01-19 13:55:32 +01:00
parent c4cbf934d0
commit 5ec22cdd23
2 changed files with 2 additions and 2 deletions

View file

@ -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) {

View file

@ -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) {