diff --git a/db/changes/10470-family/00-aclMdb.sql b/db/changes/10470-family/00-aclMdb.sql index e14fa3daa..c57f60eb3 100644 --- a/db/changes/10470-family/00-aclMdb.sql +++ b/db/changes/10470-family/00-aclMdb.sql @@ -1,6 +1,3 @@ -INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) - VALUES('MdbVersion', '*', '*', 'ALLOW', 'ROLE', 'developer'); - CREATE TABLE `vn`.`mdbBranch` ( `name` VARCHAR(255), PRIMARY KEY(`name`) @@ -12,3 +9,6 @@ CREATE TABLE `vn`.`mdbVersion` ( `version` INT, CONSTRAINT `mdbVersion_branchFk` FOREIGN KEY (`branchFk`) REFERENCES `vn`.`mdbBranch` (`name`) ON DELETE CASCADE ON UPDATE CASCADE ); + +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) + VALUES('MdbVersion', '*', '*', 'ALLOW', 'ROLE', 'developer'); diff --git a/docker-compose.yml b/docker-compose.yml index 4fc5dc811..e6e0dbdab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,7 +32,7 @@ services: - /mnt/appdata/pdfs:/var/lib/salix/pdfs - /mnt/appdata/dms:/var/lib/salix/dms - /mnt/appdata/image:/var/lib/salix/image - - /mnt/appdata/vn-access:/var/lib/salix/vn-access + - /mnt/appdata/access:/var/lib/salix/access deploy: replicas: ${BACK_REPLICAS:?} placement: diff --git a/modules/claim/front/photos/index.js b/modules/claim/front/photos/index.js index 5cde18f52..62e439a91 100644 --- a/modules/claim/front/photos/index.js +++ b/modules/claim/front/photos/index.js @@ -71,7 +71,7 @@ class Controller extends Section { } create() { - const query = `mdbVersions/upload`; + const query = `claims/${this.claim.id}/uploadFile`; const options = { method: 'POST', url: query, diff --git a/modules/mdb/back/methods/mdbVersion/upload.js b/modules/mdb/back/methods/mdbVersion/upload.js index d5725edbe..904f9f1d9 100644 --- a/modules/mdb/back/methods/mdbVersion/upload.js +++ b/modules/mdb/back/methods/mdbVersion/upload.js @@ -37,7 +37,6 @@ module.exports = Self => { Self.upload = async(ctx, appName, newVersion, branch, options) => { const models = Self.app.models; const myOptions = {}; - console.log(ctx); const TempContainer = models.TempContainer; const AccessContainer = models.AccessContainer; @@ -60,6 +59,7 @@ module.exports = Self => { return file[0]; }); const uploadedFile = files[0]; + const file = await TempContainer.getFile(tempContainer.name, uploadedFile.name); const srcFile = path.join(file.client.root, file.container, file.name); const accessContainer = await AccessContainer.container(branch);