Merge pull request 'hotfix accessScopes' (!2458) from hotfix-accesScopesPdf into master
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #2458 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
6387075413
|
@ -40,7 +40,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/:id/client-debt-statement-pdf',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.clientDebtStatementPdf = (ctx, id) => Self.printReport(ctx, id, 'client-debt-statement');
|
||||
|
|
|
@ -3,6 +3,7 @@ const UserError = require('vn-loopback/util/user-error');
|
|||
module.exports = function(Self) {
|
||||
Self.remoteMethodCtx('createReceipt', {
|
||||
description: 'Creates receipt and its compensation if necessary',
|
||||
accessType: 'READ',
|
||||
accepts: [{
|
||||
arg: 'clientFk',
|
||||
type: 'number',
|
||||
|
@ -45,7 +46,8 @@ module.exports = function(Self) {
|
|||
http: {
|
||||
verb: 'post',
|
||||
path: '/:clientFk/createReceipt'
|
||||
}
|
||||
},
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.createReceipt = async(ctx, options) => {
|
||||
|
|
|
@ -35,7 +35,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/:id/credit-request-pdf',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.creditRequestPdf = (ctx, id) => Self.printReport(ctx, id, 'credit-request');
|
||||
|
|
|
@ -47,7 +47,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/:id/incoterms-authorization-pdf',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.incotermsAuthorizationPdf = (ctx, id) => Self.printReport(ctx, id, 'incoterms-authorization');
|
||||
|
|
|
@ -41,7 +41,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/:id/letter-debtor-pdf',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.letterDebtorPdf = (ctx, id) => Self.printReport(ctx, id, 'letter-debtor');
|
||||
|
|
|
@ -29,7 +29,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/:id/balance-compensation-pdf',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.balanceCompensationPdf = (ctx, id) => Self.printReport(ctx, id, 'balance-compensation');
|
||||
|
|
|
@ -34,7 +34,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/:id/receipt-pdf',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.receiptPdf = (ctx, id) => Self.printReport(ctx, id, 'receipt');
|
||||
|
|
|
@ -31,7 +31,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/:reference/invoice-out-pdf',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.invoiceOutPdf = async(ctx, reference) => {
|
||||
|
|
|
@ -51,7 +51,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/:id/label-pdf',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.labelPdf = (ctx, id) => Self.printReport(ctx, id, 'item-label');
|
||||
|
|
Loading…
Reference in New Issue