From a7d9bbc582abf96611fecfb3ac31aa7fdaf4b506 Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 20 Jun 2023 10:22:30 +0200 Subject: [PATCH 1/2] refs #5537 change cl c --- print/core/components/report-footer/report-footer.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/print/core/components/report-footer/report-footer.js b/print/core/components/report-footer/report-footer.js index 077ef0bde..ed718b8dc 100755 --- a/print/core/components/report-footer/report-footer.js +++ b/print/core/components/report-footer/report-footer.js @@ -5,10 +5,9 @@ module.exports = { name: 'report-footer', async serverPrefetch() { this.company = await db.findOne(` - SELECT IFNULL(ci.footnotes, cl.footnotes) as footnotes + SELECT IFNULL(ci.footnotes, c.footnotes) footnotes FROM company c - LEFT JOIN companyL10n cl ON c.id = cl.id - LEFT JOIN companyI18n ci ON ci.companyFk = cl.id + LEFT JOIN companyI18n ci ON ci.companyFk = c.id AND ci.lang = (SELECT lang FROM account.user where id = ?) WHERE c.code = ?`, [this.recipientId, this.companyCode]); From d9afdccd9cd48f28ac38421967a5f5a0c2db69fc Mon Sep 17 00:00:00 2001 From: vicent Date: Wed, 21 Jun 2023 14:12:42 +0200 Subject: [PATCH 2/2] fix: acl renewToken --- back/methods/vn-user/renew-token.js | 1 + db/changes/232601/00-aclVnUser_renewToken.sql | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 db/changes/232601/00-aclVnUser_renewToken.sql diff --git a/back/methods/vn-user/renew-token.js b/back/methods/vn-user/renew-token.js index 1f3532bd6..41470dfea 100644 --- a/back/methods/vn-user/renew-token.js +++ b/back/methods/vn-user/renew-token.js @@ -3,6 +3,7 @@ const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethodCtx('renewToken', { description: 'Checks if the token has more than renewPeriod seconds to live and if so, renews it', + accessType: 'WRITE', accepts: [], returns: { type: 'Object', diff --git a/db/changes/232601/00-aclVnUser_renewToken.sql b/db/changes/232601/00-aclVnUser_renewToken.sql new file mode 100644 index 000000000..aa20f7a82 --- /dev/null +++ b/db/changes/232601/00-aclVnUser_renewToken.sql @@ -0,0 +1,3 @@ +INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalType, principalId) + VALUES + ('VnUser', 'renewToken', 'WRITE', 'ALLOW', 'ROLE', 'employee')