mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 09:57:25 +08:00
Convert Discourse.User
to use Discourse.Singleton
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user