refs #5816 Remove duplicated logs #1634
|
@ -3,6 +3,7 @@ const UserError = require('vn-loopback/util/user-error');
|
||||||
module.exports = Self => {
|
module.exports = Self => {
|
||||||
Self.remoteMethodCtx('renewToken', {
|
Self.remoteMethodCtx('renewToken', {
|
||||||
description: 'Checks if the token has more than renewPeriod seconds to live and if so, renews it',
|
description: 'Checks if the token has more than renewPeriod seconds to live and if so, renews it',
|
||||||
|
accessType: 'WRITE',
|
||||||
accepts: [],
|
accepts: [],
|
||||||
returns: {
|
returns: {
|
||||||
type: 'Object',
|
type: 'Object',
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalType, principalId)
|
||||||
|
VALUES
|
||||||
|
('VnUser', 'renewToken', 'WRITE', 'ALLOW', 'ROLE', 'employee')
|
|
@ -5,10 +5,9 @@ module.exports = {
|
||||||
name: 'report-footer',
|
name: 'report-footer',
|
||||||
async serverPrefetch() {
|
async serverPrefetch() {
|
||||||
this.company = await db.findOne(`
|
this.company = await db.findOne(`
|
||||||
SELECT IFNULL(ci.footnotes, cl.footnotes) as footnotes
|
SELECT IFNULL(ci.footnotes, c.footnotes) footnotes
|
||||||
FROM company c
|
FROM company c
|
||||||
LEFT JOIN companyL10n cl ON c.id = cl.id
|
LEFT JOIN companyI18n ci ON ci.companyFk = c.id
|
||||||
LEFT JOIN companyI18n ci ON ci.companyFk = cl.id
|
|
||||||
AND ci.lang = (SELECT lang FROM account.user where id = ?)
|
AND ci.lang = (SELECT lang FROM account.user where id = ?)
|
||||||
WHERE c.code = ?`,
|
WHERE c.code = ?`,
|
||||||
[this.recipientId, this.companyCode]);
|
[this.recipientId, this.companyCode]);
|
||||||
|
|
Loading…
Reference in New Issue