#6930 - Add DEFAULT scope when is Multimedia scope #2333
|
@ -30,7 +30,7 @@ module.exports = Self => {
|
|||
path: `/:id/downloadFile`,
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.downloadFile = async function(ctx, id) {
|
||||
|
|
|
@ -43,7 +43,7 @@ module.exports = Self => {
|
|||
path: `/:id/download`,
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.download = async function(id, fileCabinet, filter) {
|
||||
|
|
|
@ -48,7 +48,7 @@ module.exports = Self => {
|
|||
path: `/:collection/:size/:id/download`,
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.download = async function(ctx, collection, size, id) {
|
||||
|
|
|
@ -28,6 +28,9 @@ describe('Renew Token', () => {
|
|||
});
|
||||
|
||||
it('should renew token', async() => {
|
||||
const {courtesyTime} = await models.AccessTokenConfig.findOne({
|
||||
fields: ['courtesyTime']
|
||||
});
|
||||
const mockDate = new Date(startingTime + 26600000);
|
||||
jasmine.clock().mockDate(mockDate);
|
||||
const {id} = await models.VnUser.renewToken(ctx);
|
||||
|
@ -35,7 +38,7 @@ describe('Renew Token', () => {
|
|||
expect(id).not.toEqual(ctx.req.accessToken.id);
|
||||
|
||||
await models.VnUser.logout(ctx.req.accessToken.id);
|
||||
jasmine.clock().tick(70 * 1000);
|
||||
jasmine.clock().tick((courtesyTime + 10) * 1000);
|
||||
let tokenNotExists;
|
||||
try {
|
||||
tokenNotExists = await models.AccessToken.findById(ctx.req.accessToken.id);
|
||||
|
|
|
@ -224,5 +224,6 @@
|
|||
"There are not picking tickets": "There are not picking tickets",
|
||||
"ticketCommercial": "The ticket {{ ticket }} for the salesperson {{ salesMan }} is in preparation. (automatically generated message)",
|
||||
"This password can only be changed by the user themselves": "This password can only be changed by the user themselves",
|
||||
"They're not your subordinate": "They're not your subordinate"
|
||||
"They're not your subordinate": "They're not your subordinate",
|
||||
"InvoiceIn is already booked": "InvoiceIn is already booked"
|
||||
}
|
|
@ -35,7 +35,7 @@ module.exports = Self => {
|
|||
path: '/:id/claim-pickup-pdf',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.claimPickupPdf = (ctx, id) => Self.printReport(ctx, id, 'claim-pickup-order');
|
||||
|
|
|
@ -33,7 +33,7 @@ module.exports = Self => {
|
|||
path: `/:id/downloadFile`,
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.downloadFile = async function(ctx, id) {
|
||||
|
|
|
@ -46,7 +46,7 @@ module.exports = Self => {
|
|||
path: '/:id/campaign-metrics-pdf',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.campaignMetricsPdf = (ctx, id) => Self.printReport(ctx, id, 'campaign-metrics');
|
||||
|
|
|
@ -34,7 +34,7 @@ module.exports = Self => {
|
|||
path: '/:id/entry-order-pdf',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.entryOrderPdf = (ctx, id) => Self.printReport(ctx, id, 'entry-order');
|
||||
|
|
|
@ -32,7 +32,7 @@ module.exports = Self => {
|
|||
path: '/:id/download',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.download = async function(ctx, id, options) {
|
||||
|
|
|
@ -32,7 +32,7 @@ module.exports = Self => {
|
|||
path: '/downloadZip',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.downloadZip = async function(ctx, ids, options) {
|
||||
|
|
|
@ -35,7 +35,7 @@ module.exports = Self => {
|
|||
path: '/:reference/exportation-pdf',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.exportationPdf = (ctx, reference) => Self.printReport(ctx, reference, 'exportation');
|
||||
|
|
|
@ -38,7 +38,7 @@ module.exports = Self => {
|
|||
path: '/:reference/invoice-csv',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.invoiceCsv = async reference => {
|
||||
|
|
|
@ -40,7 +40,7 @@ module.exports = Self => {
|
|||
path: '/negativeBasesCsv',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.negativeBasesCsv = async(ctx, options) => {
|
||||
|
|
|
@ -11,7 +11,7 @@ module.exports = Self => {
|
|||
path: `/download`,
|
||||
verb: 'POST',
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.download = async() => {
|
||||
|
|
|
@ -30,7 +30,7 @@ module.exports = Self => {
|
|||
path: '/:id/cmr',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.cmr = (ctx, id) => Self.printReport(ctx, id, 'cmr');
|
||||
|
|
|
@ -30,7 +30,7 @@ module.exports = Self => {
|
|||
path: '/downloadCmrsZip',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.downloadCmrsZip = async function(ctx, ids, options) {
|
||||
|
|
|
@ -30,7 +30,7 @@ module.exports = Self => {
|
|||
path: '/downloadZip',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.downloadZip = async function(ctx, id, options) {
|
||||
|
|
|
@ -35,7 +35,7 @@ module.exports = Self => {
|
|||
path: '/:id/driver-route-pdf',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ module.exports = Self => {
|
|||
path: '/:id/campaign-metrics-pdf',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.campaignMetricsPdf = (ctx, id) => Self.printReport(ctx, id, 'supplier-campaign-metrics');
|
||||
|
|
|
@ -38,7 +38,7 @@ module.exports = Self => {
|
|||
path: '/:id/delivery-note-csv',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.deliveryNoteCsv = async id => {
|
||||
|
|
|
@ -42,7 +42,7 @@ module.exports = Self => {
|
|||
path: '/:id/delivery-note-pdf',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.deliveryNotePdf = (ctx, id) => Self.printReport(ctx, id, 'delivery-note');
|
||||
|
|
|
@ -79,7 +79,7 @@ module.exports = Self => {
|
|||
path: '/extra-community-pdf',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.extraCommunityPdf = ctx => Self.printReport(ctx, null, 'extra-community');
|
||||
|
|
|
@ -30,7 +30,7 @@ module.exports = Self => {
|
|||
path: `/:id/downloadFile`,
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.downloadFile = async function(ctx, id) {
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
{
|
||||
"relation": "user",
|
||||
"scope": {
|
||||
"fields": ["email", "name", "nickname", "roleFk"],
|
||||
"fields": ["email", "name", "nickname", "roleFk", "emailVerified"],
|
||||
|
||||
"include": [
|
||||
{
|
||||
"relation": "role",
|
||||
|
|
Loading…
Reference in New Issue
name esta repetido
ARGGGH