fix: refs #7355 remove and tests accounts #2850

Merged
alexm merged 5 commits from 7355-accountMigration2 into dev 2024-08-14 12:22:13 +00:00
11 changed files with 40 additions and 7 deletions
Showing only changes of commit f5fd85771f - Show all commits

View File

@ -24,6 +24,10 @@ module.exports = Self => {
arg: 'lang',
type: 'string',
description: 'The user lang'
}, {
arg: 'twoFactor',
type: 'string',
description: 'The user twoFactor'
}
],
http: {
@ -32,8 +36,8 @@ module.exports = Self => {
}
});
Self.updateUser = async(ctx, id, name, nickname, email, lang) => {
Self.updateUser = async(ctx, id, name, nickname, email, lang, twoFactor) => {
await Self.userSecurity(ctx, id);
await Self.upsertWithWhere({id}, {name, nickname, email, lang});
await Self.upsertWithWhere({id}, {name, nickname, email, lang, twoFactor});
};
};

View File

@ -101,9 +101,10 @@ module.exports = function(Self) {
const headers = httpRequest.headers;
const origin = headers.origin;
const defaultHash = '/reset-password?access_token=$token$';
const defaultHash = '!/reset-password?access_token=$token$';
const recoverHashes = {
hedera: 'verificationToken=$token$'
hedera: '!verificationToken=$token$',
lilium: '/resetPassword?access_token=$token$'
};
const app = info.options?.app;
@ -115,7 +116,7 @@ module.exports = function(Self) {
const params = {
recipient: info.email,
lang: user.lang,
url: origin + '/#!' + recoverHash
url: origin + '/#' + recoverHash
};
const options = Object.assign({}, info.options);

View File

@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `salix`.`ACL_afterDelete`
AFTER DELETE ON `ACL`
FOR EACH ROW
BEGIN
INSERT INTO ACL
INSERT INTO ACLLog
SET `action` = 'delete',
`changedModel` = 'Acl',
`changedModelId` = OLD.id,

View File

@ -189,7 +189,7 @@ BEGIN
SELECT * FROM sales
UNION ALL
SELECT * FROM orders
ORDER BY shipped,
ORDER BY shipped DESC,
(inventorySupplierFk = entityId) DESC,
alertLevel DESC,
isTicket,

View File

@ -0,0 +1,8 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`host_beforeInsert`
BEFORE INSERT ON `host`
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
END$$
DELIMITER ;

View File

@ -4,5 +4,6 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`host_beforeUpdate`
FOR EACH ROW
BEGIN
SET new.updated = util.VN_NOW();
SET NEW.editorFk = account.myUser_getId();
END$$
DELIMITER ;

View File

@ -0,0 +1 @@
DROP TABLE bi.Greuges_comercial_detail;

View File

@ -0,0 +1 @@
ALTER TABLE vn.host ADD editorFk int(10) unsigned DEFAULT NULL NULL;

View File

@ -0,0 +1,3 @@
ALTER TABLE vn.item
ADD CONSTRAINT item_itemPackingType_FK FOREIGN KEY (itemPackingTypeFk)
REFERENCES vn.itemPackingType(code) ON DELETE RESTRICT ON UPDATE CASCADE;

View File

@ -0,0 +1,7 @@
name: time control
columns:
direction: direction
isSendMail: sent mail
logExclude: excluded log
manual: manual
timed: timed

View File

@ -0,0 +1,7 @@
name: control horario
columns:
direction: dirección
isSendMail: correo enviado
logExclude: registro excluido
manual: manual
timed: fichada