This commit is contained in:
parent
62fa54e02f
commit
8c39f65dc3
|
@ -21,5 +21,12 @@
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true
|
"required": true
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"acls": [{
|
||||||
|
"accessType": "READ",
|
||||||
|
"principalType": "ROLE",
|
||||||
|
"principalId": "$everyone",
|
||||||
|
"permission": "ALLOW"
|
||||||
|
}]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,12 +221,6 @@ module.exports = function(Self) {
|
||||||
{environment: env}
|
{environment: env}
|
||||||
]}
|
]}
|
||||||
});
|
});
|
||||||
const hederaUrl = await Self.app.models.Url.findOne({
|
|
||||||
where: {and: [
|
|
||||||
{appName: 'hedera'},
|
|
||||||
{environment: env}
|
|
||||||
]}
|
|
||||||
});
|
|
||||||
|
|
||||||
const isWorker = instance.isWorker || await Self.app.models.Account.findById(instance.id, null, ctx.options);
|
const isWorker = instance.isWorker || await Self.app.models.Account.findById(instance.id, null, ctx.options);
|
||||||
class Mailer {
|
class Mailer {
|
||||||
|
@ -246,7 +240,7 @@ module.exports = function(Self) {
|
||||||
type: 'email',
|
type: 'email',
|
||||||
to: newEmail,
|
to: newEmail,
|
||||||
from: {},
|
from: {},
|
||||||
redirect: `${liliumUrl.url}verifyEmail?isWorker=${!!isWorker}&url=${hederaUrl.url}`,
|
redirect: `${liliumUrl.url}verifyEmail?isWorker=${!!isWorker}`,
|
||||||
template: false,
|
template: false,
|
||||||
mailer: new Mailer,
|
mailer: new Mailer,
|
||||||
host: url[1].split('/')[2],
|
host: url[1].split('/')[2],
|
||||||
|
|
|
@ -2,3 +2,8 @@ INSERT INTO `salix`.`url` (`appName`, `environment`, `url`)
|
||||||
VALUES
|
VALUES
|
||||||
('hedera', 'test', 'https://test-shop.verdnatura.es/'),
|
('hedera', 'test', 'https://test-shop.verdnatura.es/'),
|
||||||
('hedera', 'production', 'https://shop.verdnatura.es/');
|
('hedera', 'production', 'https://shop.verdnatura.es/');
|
||||||
|
|
||||||
|
DELETE FROM `salix`.`ACL`
|
||||||
|
WHERE model = 'Url'
|
||||||
|
AND 'accessType' = 'READ'
|
||||||
|
AND principalId = 'employee';
|
||||||
|
|
Loading…
Reference in New Issue