mirror of https://github.com/rancher/ui.git
15 lines
369 B
JavaScript
15 lines
369 B
JavaScript
import Ember from "ember";
|
|
|
|
export default Ember.Mixin.create({
|
|
access: Ember.inject.service(),
|
|
|
|
beforeModel: function(transition) {
|
|
this._super.apply(this,arguments);
|
|
if ( this.get('access.enabled') && !this.get('access.isLoggedIn') )
|
|
{
|
|
transition.send('logout', transition, false);
|
|
return Ember.RSVP.reject('Not logged in');
|
|
}
|
|
}
|
|
});
|