Merge branch 'dev' into 5890--itemShelvingAsignado

This commit is contained in:
Carlos Andrés 2023-09-28 15:13:37 +02:00
commit 52cba80dc8
11 changed files with 26 additions and 14 deletions

View File

@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2342.01] - 2023-10-19
### Added
### Changed
### Fixed
## [2340.01] - 2023-10-05 ## [2340.01] - 2023-10-05

View File

@ -1,6 +1,6 @@
ALTER TABLE `vn`.`deviceLog` ADD serialNumber varchar(45) DEFAULT NULL NULL; -- ALTER TABLE `vn`.`deviceLog` ADD serialNumber varchar(45) DEFAULT NULL NULL;
INSERT INTO `salix`.`ACL` ( model, property, accessType, permission, principalType, principalId) -- INSERT INTO `salix`.`ACL` ( model, property, accessType, permission, principalType, principalId)
VALUES( 'DeviceLog', 'create', 'WRITE', 'ALLOW', 'ROLE', 'employee'); -- VALUES( 'DeviceLog', 'create', 'WRITE', 'ALLOW', 'ROLE', 'employee');

View File

@ -4,13 +4,18 @@ INSERT INTO `account`.`role` (name, description)
INSERT INTO `account`.`roleInherit` (role, inheritsFrom) INSERT INTO `account`.`roleInherit` (role, inheritsFrom)
SELECT (SELECT id FROM account.role r1 WHERE r1.name = 'deliveryAssistant'), ri.inheritsFrom SELECT (SELECT id FROM account.role r1 WHERE r1.name = 'deliveryAssistant'), ri.inheritsFrom
FROM account.roleInherit ri FROM account.roleInherit ri
JOIN account.role r2 ON r2.id = ri.`role` JOIN account.role r2 ON r2.id = ri.`role`
WHERE r2.name = 'deliveryBoss'; WHERE r2.name = 'deliveryBoss';
DELETE `account`.`roleInherit` FROM `account`.`roleInherit`
JOIN `account`.`role` r ON `account`.`roleInherit`.role = r.id
WHERE r.name = 'deliveryBoss';
INSERT INTO `account`.`roleInherit` (role, inheritsFrom) INSERT INTO `account`.`roleInherit` (role, inheritsFrom)
SELECT (SELECT id FROM account.role WHERE name = 'deliveryBoss') role, SELECT (SELECT id FROM account.role WHERE name = 'deliveryBoss') role,
(SELECT id FROM account.role WHERE name = 'deliveryAssistant') roleInherit; (SELECT id FROM account.role WHERE name = 'deliveryAssistant') roleInherit;
UPDATE `salix`.`ACL`
CALL `account`.`role_syncPrivileges`(); SET principalId='deliveryAssistant'
WHERE principalId='deliveryBoss';

View File

@ -0,0 +1,2 @@
-- Locally it fails because it is executed before the fixtures and the roleConfig table is empty
CALL `account`.`role_syncPrivileges`();

View File

File diff suppressed because one or more lines are too long

View File

@ -32,6 +32,6 @@ module.exports = Self => {
Self.setVisibleDiscard = async(ctx, itemFk, warehouseFk, quantity, addressFk) => { Self.setVisibleDiscard = async(ctx, itemFk, warehouseFk, quantity, addressFk) => {
const query = `CALL vn.item_setVisibleDiscard(?, ?, ?, ?)`; const query = `CALL vn.item_setVisibleDiscard(?, ?, ?, ?)`;
await Self.rawSql(query, [itemFk, warehouseFk, quantity, addressFk]); await Self.rawSql(query, [itemFk, warehouseFk, quantity, addressFk], {userId: ctx.req.accessToken.userId});
}; };
}; };

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "salix-back", "name": "salix-back",
"version": "23.32.02", "version": "23.42.01",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "salix-back", "name": "salix-back",
"version": "23.26.01", "version": "23.42.01",
"license": "GPL-3.0", "license": "GPL-3.0",
"dependencies": { "dependencies": {
"axios": "^1.2.2", "axios": "^1.2.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "salix-back", "name": "salix-back",
"version": "23.40.01", "version": "23.42.01",
"author": "Verdnatura Levante SL", "author": "Verdnatura Levante SL",
"description": "Salix backend", "description": "Salix backend",
"license": "GPL-3.0", "license": "GPL-3.0",