From 5ec52bd2e94b2d910bb3bdc7cf6a9e4eac2994d2 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 2 May 2013 17:22:27 +1000 Subject: [PATCH] :s/moderator?/staff/g ... our naming was kind of crazy, renamed moderator? to staff --- .../discourse/controllers/user_controller.js | 2 +- .../discourse/templates/header.js.handlebars | 22 ++---- .../templates/user/user.js.handlebars | 2 +- .../stylesheets/application/header.css.scss | 9 ++- app/controllers/admin/admin_controller.rb | 9 ++- app/helpers/application_helper.rb | 4 + app/models/post_action.rb | 2 +- app/models/user.rb | 7 +- app/models/user_action.rb | 2 +- app/serializers/current_user_serializer.rb | 14 +--- app/serializers/post_serializer.rb | 6 +- .../common/_discourse_javascript.html.erb | 2 +- .../common/_discourse_stylesheet.html.erb | 2 +- config/routes.rb | 4 +- lib/guardian.rb | 77 +++++++++---------- lib/rate_limiter.rb | 4 +- ...ator_constraint.rb => staff_constraint.rb} | 2 +- lib/topic_view.rb | 4 +- spec/models/user_spec.rb | 4 +- 19 files changed, 82 insertions(+), 96 deletions(-) rename lib/{moderator_constraint.rb => staff_constraint.rb} (90%) diff --git a/app/assets/javascripts/discourse/controllers/user_controller.js b/app/assets/javascripts/discourse/controllers/user_controller.js index 2b56d4bfab5..4cbc4837f14 100644 --- a/app/assets/javascripts/discourse/controllers/user_controller.js +++ b/app/assets/javascripts/discourse/controllers/user_controller.js @@ -13,7 +13,7 @@ Discourse.UserController = Discourse.ObjectController.extend({ }).property('content.username', 'Discourse.currentUser.username'), canSeePrivateMessages: (function() { - return this.get('viewingSelf') || Discourse.get('currentUser.moderator'); + return this.get('viewingSelf') || Discourse.get('currentUser.staff'); }).property('viewingSelf', 'Discourse.currentUser') }); diff --git a/app/assets/javascripts/discourse/templates/header.js.handlebars b/app/assets/javascripts/discourse/templates/header.js.handlebars index 6f0f7284abb..4726c274394 100644 --- a/app/assets/javascripts/discourse/templates/header.js.handlebars +++ b/app/assets/javascripts/discourse/templates/header.js.handlebars @@ -65,26 +65,18 @@