diff --git a/app/assets/javascripts/discourse/controllers/user_dropdown_controller.js b/app/assets/javascripts/discourse/controllers/user_dropdown_controller.js new file mode 100644 index 00000000000..4110dd01ce2 --- /dev/null +++ b/app/assets/javascripts/discourse/controllers/user_dropdown_controller.js @@ -0,0 +1,10 @@ +Discourse.UserDropdownController = Ember.ArrayController.extend(Discourse.HasCurrentUser, { + showAdminLinks: Em.computed.alias("currentUser.staff"), + + actions: { + logout: function() { + Discourse.logout(); + return false; + } + } +}); diff --git a/app/assets/javascripts/discourse/templates/header.js.handlebars b/app/assets/javascripts/discourse/templates/header.js.handlebars index 0b5601e5a27..e850f5fd803 100644 --- a/app/assets/javascripts/discourse/templates/header.js.handlebars +++ b/app/assets/javascripts/discourse/templates/header.js.handlebars @@ -89,9 +89,16 @@ {{currentUser.site_flagged_posts_count}} {{/if}} -
  • +