Convert Discourse.User to use Discourse.Singleton

This commit is contained in:
Robin Ward
2013-08-08 12:42:08 -04:00
parent 8e1fae0459
commit 51f5cf77fb
23 changed files with 90 additions and 57 deletions

View File

@ -12,11 +12,11 @@ Discourse.AdminDashboardController = Ember.Controller.extend({
problemsCheckMinutes: 1,
foundProblems: function() {
return(Discourse.User.current('admin') && this.get('problems') && this.get('problems').length > 0);
return(Discourse.User.currentProp('admin') && this.get('problems') && this.get('problems').length > 0);
}.property('problems'),
thereWereProblems: function() {
if(!Discourse.User.current('admin')) { return false }
if(!Discourse.User.currentProp('admin')) { return false }
if( this.get('foundProblems') ) {
this.set('hadProblems', true);
return true;