mirror of
https://github.com/flarum/framework.git
synced 2024-12-13 23:53:42 +08:00
c2feae406d
- Allow dropdown-buttons to render a partial
11 lines
325 B
JavaScript
11 lines
325 B
JavaScript
import Base from 'simple-auth/authorizers/base';
|
|
|
|
export default Base.extend({
|
|
|
|
authorize: function(jqXHR, requestOptions) {
|
|
var token = this.get('session.token');
|
|
if (this.get('session.isAuthenticated') && !Ember.isEmpty(token)) {
|
|
jqXHR.setRequestHeader('Authorization', 'Token ' + token);
|
|
}
|
|
}
|
|
}); |