From 2b05e8c48e4c2dae7920fdbff21a178767d84f89 Mon Sep 17 00:00:00 2001 From: jgallego Date: Mon, 21 Oct 2024 13:29:33 +0200 Subject: [PATCH] feat: refs #7943 quitar lectura en metodos comunes --- db/routines/salix/triggers/ACL_beforeInsert.sql | 3 +++ db/versions/11314-redTulip/00-restrictedAsterisk.sql | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 db/versions/11314-redTulip/00-restrictedAsterisk.sql diff --git a/db/routines/salix/triggers/ACL_beforeInsert.sql b/db/routines/salix/triggers/ACL_beforeInsert.sql index 94fb51ada..cb0b5761b 100644 --- a/db/routines/salix/triggers/ACL_beforeInsert.sql +++ b/db/routines/salix/triggers/ACL_beforeInsert.sql @@ -4,5 +4,8 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `salix`.`ACL_beforeInsert` FOR EACH ROW BEGIN SET NEW.editorFk = account.myUser_getId(); + IF NEW.`property` = '*' THEN + CALL util.throw('The property field cannot be *'); + END IF; END$$ DELIMITER ; diff --git a/db/versions/11314-redTulip/00-restrictedAsterisk.sql b/db/versions/11314-redTulip/00-restrictedAsterisk.sql new file mode 100644 index 000000000..20f1b4380 --- /dev/null +++ b/db/versions/11314-redTulip/00-restrictedAsterisk.sql @@ -0,0 +1,3 @@ +DELETE FROM `salix`.`ACL` +WHERE `model` = 'Worker' + AND `property` IN ('find', 'findById', 'findOne');