diff --git a/services/db/04-fixtures.sql b/services/db/04-fixtures.sql index 7f15a7a13..9f7bc3f63 100644 --- a/services/db/04-fixtures.sql +++ b/services/db/04-fixtures.sql @@ -418,10 +418,10 @@ INSERT INTO `salix`.`user`(`id`,`username`,`password`,`email`) VALUES (10, 'JessicaJones', 'ac754a330530832ba1bf7687f577da91', 'JessicaJones@verdnatura.es'); -INSERT INTO `vn`.`tag`(`id`,`name`,`free`,`isQuantitatif`,`sourceTable`,`unit`) +INSERT INTO `vn`.`tag`(`id`,`name`,`isFree`,`isQuantitatif`,`sourceTable`,`unit`) VALUES - (1, 'Color', 1, 0, null, null), - (2, 'Power', 1, 0, null, null), + (1, 'Color', 0, 0, null, null), + (2, 'Power', 0, 0, null, null), (3, 'Shape', 1, 0, null, null), (4, 'Location', 1, 0, null, null), (5, 'Owner', 1, 1, null, null); diff --git a/services/db/changes/1.0.0/08-tag.sql b/services/db/changes/1.0.0/08-tag.sql new file mode 100644 index 000000000..8f7536308 --- /dev/null +++ b/services/db/changes/1.0.0/08-tag.sql @@ -0,0 +1,2 @@ +ALTER TABLE `vn`.`tag` +CHANGE COLUMN `free` `isFree` TINYINT(1) NOT NULL DEFAULT '1' ; diff --git a/services/item/common/models/itemTag.json b/services/item/common/models/itemTag.json index 3de8dc1aa..d7622adae 100644 --- a/services/item/common/models/itemTag.json +++ b/services/item/common/models/itemTag.json @@ -32,5 +32,13 @@ "model": "Tag", "foreignKey": "tagFk" } - } + }, + "acls": [ + { + "accessType": "READ", + "principalType": "ROLE", + "principalId": "$everyone", + "permission": "ALLOW" + } + ] } diff --git a/services/item/common/models/tag.json b/services/item/common/models/tag.json index 0df56ef10..b327c6588 100644 --- a/services/item/common/models/tag.json +++ b/services/item/common/models/tag.json @@ -17,7 +17,7 @@ "type": "String", "required": true }, - "free": { + "isFree": { "type": "Number" }, "sourceTable": {