|
@@ -1,11 +1,17 @@
|
|
import Ember from 'ember';
|
|
import Ember from 'ember';
|
|
|
|
|
|
export default Ember.Service.extend({
|
|
export default Ember.Service.extend({
|
|
- isAnonymous: function() {
|
|
|
|
- return !this.get('isAuthenticated');
|
|
|
|
- }.property('isAuthenticated'),
|
|
|
|
|
|
+ isAnonymous: Ember.computed.not('isAuthenticated'),
|
|
|
|
|
|
logout: function() {
|
|
logout: function() {
|
|
Ember.$('#hidden-logout-form').submit();
|
|
Ember.$('#hidden-logout-form').submit();
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ blockAuthenticated: function(message) {
|
|
|
|
+ // TODO: if user is authenticated, throw error 403 with message
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ blockAnonymous: function(message) {
|
|
|
|
+ // TODO: if user is not authenticated, throw error 403 with message
|
|
|
|
+ }
|
|
});
|
|
});
|