mirror of
https://github.com/documize/community.git
synced 2025-08-05 13:35:25 +02:00
Migrate document attachments view to new UI framework
This commit is contained in:
parent
7cdf97aa86
commit
3d2060ca60
9 changed files with 148 additions and 9 deletions
|
@ -356,7 +356,7 @@ export default Service.extend({
|
|||
},
|
||||
|
||||
//**************************************************
|
||||
// Export
|
||||
// Export content to HTML
|
||||
//**************************************************
|
||||
|
||||
export(spec) {
|
||||
|
@ -367,6 +367,14 @@ export default Service.extend({
|
|||
});
|
||||
},
|
||||
|
||||
//**************************************************
|
||||
// Secure document attachment download
|
||||
//**************************************************
|
||||
|
||||
downloadAttachment(fileId) {
|
||||
return this.get('ajax').get(`attachment/${fileId}`, {});
|
||||
},
|
||||
|
||||
//**************************************************
|
||||
// Fetch bulk data
|
||||
//**************************************************
|
||||
|
|
|
@ -85,6 +85,16 @@ export default SimpleAuthSession.extend({
|
|||
this.get('session.content.authenticated.user.viewUsers') === true;
|
||||
}),
|
||||
|
||||
authToken: computed('session.content.authenticated.user', function () {
|
||||
if (is.null(this.get('session.authenticator')) ||
|
||||
this.get('appMeta.secureMode')) return '';
|
||||
|
||||
if (this.get('session.authenticator') === 'authenticator:anonymous' ||
|
||||
this.get('session.content.authenticated.user.id') === '0') return '';
|
||||
|
||||
return this.get('session.content.authenticated.token');
|
||||
}),
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue