mirror of
https://github.com/flarum/framework.git
synced 2024-11-30 13:36:10 +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);
|
|
}
|
|
}
|
|
}); |