This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/mixins/has_current_user.js
2015-02-12 11:53:21 -05:00

13 lines
349 B
JavaScript

/**
This mixin provides a `currentUser` property that can be used to retrieve information
about the currently logged in user. It is mostly useful to controllers so it can be
exposted to templates.
**/
Discourse.HasCurrentUser = Em.Mixin.create({
currentUser: function() {
return Discourse.User.current();
}.property().volatile()
});