feat: refs #7943 quitar lectura en metodos comunes #3136

Merged
jgallego merged 2 commits from 7943-permisosWorker into dev 2024-10-23 05:53:04 +00:00
4 changed files with 21 additions and 15 deletions

View File

@ -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 *');
Review

fins que llevem els * i pugam posar açò en un CHECK.
De moment així evitem que no vaja a mes.

fins que llevem els * i pugam posar açò en un CHECK. De moment així evitem que no vaja a mes.
END IF;
END$$
DELIMITER ;

View File

@ -0,0 +1,3 @@
DELETE FROM `salix`.`ACL`
WHERE `model` = 'Worker'
AND `property` IN ('find', 'findById', 'findOne');
Review

jo he preguntat a Sergio i ja ho ha llevat, i en lilium i en salix no es gasten ni en access, no se si cal mirar en altre lloc

jo he preguntat a Sergio i ja ho ha llevat, i en lilium i en salix no es gasten ni en access, no se si cal mirar en altre lloc
Review

Son quan crides a Workers, Workers/:id

Aci (baix de tot) estan les equivalencies https://loopback.io/doc/en/lb2/Controlling-data-access.html

Son quan crides a Workers, Workers/:id Aci (baix de tot) estan les equivalencies https://loopback.io/doc/en/lb2/Controlling-data-access.html
Review

Per exemple si no es pot fer find, este desplegable fallara:
13a6f1f8c1/modules/item/front/item-type/basic-data/index.html (L27)

Per exemple si no es pot fer find, este desplegable fallara: https://gitea.verdnatura.es/verdnatura/salix/src/commit/13a6f1f8c1e17b6bba6f5f8bed3172a229f01fda/modules/item/front/item-type/basic-data/index.html#L27

View File

@ -11,26 +11,26 @@
<vn-card class="vn-pa-lg">
<vn-vertical>
<vn-textfield
label="Code"
label="Code"
ng-model="$ctrl.itemType.code"
rule
vn-focus>
</vn-textfield>
<vn-textfield
label="Name"
label="Name"
ng-model="$ctrl.itemType.name"
rule>
</vn-textfield>
<vn-autocomplete
label="Worker"
label="Worker"
ng-model="$ctrl.itemType.workerFk"
url="Workers"
show-field="firstName"
url="Workers/search"
show-field="nickname"
value-field="id"
rule>
</vn-autocomplete>
<vn-autocomplete
label="Category"
label="Category"
ng-model="$ctrl.itemType.categoryFk"
url="ItemCategories"
show-field="name"
@ -38,7 +38,7 @@
rule>
</vn-autocomplete>
<vn-autocomplete
label="Temperature"
label="Temperature"
ng-model="$ctrl.itemType.temperatureFk"
url="Temperatures"
show-field="name"
@ -59,4 +59,4 @@
ng-click="watcher.loadOriginalData()">
</vn-button>
</vn-button-bar>
</form>
</form>

View File

@ -12,26 +12,26 @@
<vn-card class="vn-pa-lg">
<vn-vertical>
<vn-textfield
label="Code"
label="Code"
ng-model="$ctrl.itemType.code"
rule
vn-focus>
</vn-textfield>
<vn-textfield
label="Name"
label="Name"
ng-model="$ctrl.itemType.name"
rule>
</vn-textfield>
<vn-autocomplete
label="Worker"
label="Worker"
ng-model="$ctrl.itemType.workerFk"
url="Workers"
show-field="firstName"
url="Workers/search"
show-field="nickname"
value-field="id"
rule>
</vn-autocomplete>
<vn-autocomplete
label="Category"
label="Category"
ng-model="$ctrl.itemType.categoryFk"
url="ItemCategories"
show-field="name"
@ -39,7 +39,7 @@
rule>
</vn-autocomplete>
<vn-autocomplete
label="Temperature"
label="Temperature"
ng-model="$ctrl.itemType.temperatureFk"
url="Temperatures"
show-field="name"