diff --git a/app/libs/getUser.js b/app/libs/getUser.js index 347eeee2..f01d3703 100644 --- a/app/libs/getUser.js +++ b/app/libs/getUser.js @@ -76,7 +76,7 @@ const getUser = async (req, res) => { } // Check for IPR access if (!decoded.realm_access.roles.includes(nconf.get('keycloak:role'))) { - return res.status(HTTP_STATUS.FORBIDDEN).json({message: 'IPR Access Error'}); + return res.status(HTTP_STATUS.FORBIDDEN).json({message: 'IPR Access Error: Keycloak role missing'}); } const username = decoded.preferred_username; const expiry = decoded.exp; diff --git a/test/routes/report/signatureVariants.test.js b/test/routes/report/signatureVariants.test.js index f4eaa06a..f7a25406 100644 --- a/test/routes/report/signatureVariants.test.js +++ b/test/routes/report/signatureVariants.test.js @@ -124,7 +124,7 @@ describe('/reports/{REPORTID}/sigv', () => { }); afterEach(async () => { - await db.models.signatureVariants.destroy({where: {ident: sigvUpdate.ident}, force: true}); + await db.models.signatureVariants.destroy({where: {ident: sigvUpdate.ident}}); }); test('/{sigv} - 200 Success', async () => { @@ -169,7 +169,7 @@ describe('/reports/{REPORTID}/sigv', () => { }); afterEach(async () => { - await db.models.signatureVariants.destroy({where: {ident: sigvDelete.ident}, force: true}); + await db.models.signatureVariants.destroy({where: {ident: sigvDelete.ident}}); }); test('/{sigv} - 204 No content', async () => { @@ -201,7 +201,7 @@ describe('/reports/{REPORTID}/sigv', () => { afterAll(async () => { // delete newly created report and all of it's components // indirectly by hard deleting newly created patient - report.destroy({force: true}); + report.destroy(); }); });