auth.js 429 B

1234567891011121314151617
  1. import Ember from 'ember';
  2. export default Ember.Service.extend({
  3. isAnonymous: Ember.computed.not('isAuthenticated'),
  4. logout: function() {
  5. Ember.$('#hidden-logout-form').submit();
  6. },
  7. blockAuthenticated: function(message) {
  8. // TODO: if user is authenticated, throw error 403 with message
  9. },
  10. blockAnonymous: function(message) {
  11. // TODO: if user is not authenticated, throw error 403 with message
  12. }
  13. });