auth.js 324 B

123456789101112131415
  1. import Ember from 'ember';
  2. export default Ember.Service.extend({
  3. isAnonymous: function() {
  4. return !this.get('isAuthenticated');
  5. }.property('isAuthenticated'),
  6. logout: function() {
  7. Ember.$('#hidden-logout-form').submit();
  8. },
  9. openLoginModal: function() {
  10. Ember.$('#loginModal').modal('show');
  11. }
  12. });