mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
Using Discourse.XYZ
in templates is deprecated. This fixes that, plus
adds some more integration tests to make sure login required is working.
This commit is contained in:
@ -98,14 +98,6 @@ window.Discourse = Ember.Application.createWithMixins(Discourse.Ajax, {
|
||||
return loginController.authenticationComplete(options);
|
||||
},
|
||||
|
||||
loginRequired: function() {
|
||||
return Discourse.SiteSettings.login_required && !Discourse.User.current();
|
||||
}.property().volatile(),
|
||||
|
||||
redirectIfLoginRequired: function(route) {
|
||||
if(this.get('loginRequired')) { route.transitionTo('login'); }
|
||||
},
|
||||
|
||||
/**
|
||||
Start up the Discourse application by running all the initializers we've defined.
|
||||
|
||||
|
Reference in New Issue
Block a user