hotfix accessScopes
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-05-15 12:38:30 +02:00
parent 53057863e1
commit a4e1b1931c
9 changed files with 19 additions and 9 deletions

View File

@ -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');

View File

@ -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) => {

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -31,7 +31,8 @@ module.exports = Self => {
http: {
path: '/:reference/invoice-out-pdf',
verb: 'GET'
}
},
accessScopes: ['DEFAULT', 'read:multimedia']
});
Self.invoiceOutPdf = async(ctx, reference) => {

View File

@ -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');