hotfix accessScopes #2458
|
@ -40,7 +40,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/client-debt-statement-pdf',
|
path: '/:id/client-debt-statement-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.clientDebtStatementPdf = (ctx, id) => Self.printReport(ctx, id, 'client-debt-statement');
|
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) {
|
module.exports = function(Self) {
|
||||||
Self.remoteMethodCtx('createReceipt', {
|
Self.remoteMethodCtx('createReceipt', {
|
||||||
description: 'Creates receipt and its compensation if necessary',
|
description: 'Creates receipt and its compensation if necessary',
|
||||||
|
accessType: 'READ',
|
||||||
accepts: [{
|
accepts: [{
|
||||||
arg: 'clientFk',
|
arg: 'clientFk',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
@ -45,7 +46,8 @@ module.exports = function(Self) {
|
||||||
http: {
|
http: {
|
||||||
verb: 'post',
|
verb: 'post',
|
||||||
path: '/:clientFk/createReceipt'
|
path: '/:clientFk/createReceipt'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.createReceipt = async(ctx, options) => {
|
Self.createReceipt = async(ctx, options) => {
|
||||||
|
|
|
@ -35,7 +35,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/credit-request-pdf',
|
path: '/:id/credit-request-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.creditRequestPdf = (ctx, id) => Self.printReport(ctx, id, 'credit-request');
|
Self.creditRequestPdf = (ctx, id) => Self.printReport(ctx, id, 'credit-request');
|
||||||
|
|
|
@ -47,7 +47,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/incoterms-authorization-pdf',
|
path: '/:id/incoterms-authorization-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.incotermsAuthorizationPdf = (ctx, id) => Self.printReport(ctx, id, 'incoterms-authorization');
|
Self.incotermsAuthorizationPdf = (ctx, id) => Self.printReport(ctx, id, 'incoterms-authorization');
|
||||||
|
|
|
@ -41,7 +41,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/letter-debtor-pdf',
|
path: '/:id/letter-debtor-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.letterDebtorPdf = (ctx, id) => Self.printReport(ctx, id, 'letter-debtor');
|
Self.letterDebtorPdf = (ctx, id) => Self.printReport(ctx, id, 'letter-debtor');
|
||||||
|
|
|
@ -29,7 +29,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/balance-compensation-pdf',
|
path: '/:id/balance-compensation-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.balanceCompensationPdf = (ctx, id) => Self.printReport(ctx, id, 'balance-compensation');
|
Self.balanceCompensationPdf = (ctx, id) => Self.printReport(ctx, id, 'balance-compensation');
|
||||||
|
|
|
@ -34,7 +34,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/receipt-pdf',
|
path: '/:id/receipt-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.receiptPdf = (ctx, id) => Self.printReport(ctx, id, 'receipt');
|
Self.receiptPdf = (ctx, id) => Self.printReport(ctx, id, 'receipt');
|
||||||
|
|
|
@ -31,7 +31,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:reference/invoice-out-pdf',
|
path: '/:reference/invoice-out-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.invoiceOutPdf = async(ctx, reference) => {
|
Self.invoiceOutPdf = async(ctx, reference) => {
|
||||||
|
|
|
@ -51,7 +51,8 @@ module.exports = Self => {
|
||||||
http: {
|
http: {
|
||||||
path: '/:id/label-pdf',
|
path: '/:id/label-pdf',
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
},
|
||||||
|
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.labelPdf = (ctx, id) => Self.printReport(ctx, id, 'item-label');
|
Self.labelPdf = (ctx, id) => Self.printReport(ctx, id, 'item-label');
|
||||||
|
|
Loading…
Reference in New Issue