feat: refs #7119 update vehicle permissions and enhance vehicle model with new fields
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2025-01-23 18:02:53 +01:00
parent 3ea67675da
commit 3a449896cd
2 changed files with 15 additions and 4 deletions

View File

@ -6,18 +6,23 @@ INSERT INTO salix.ACL (model, property, accessType, permission, principalType, p
('Vehicle', 'find', 'READ', 'ALLOW', 'ROLE', 'administrative'),
('Vehicle', 'find', 'READ', 'ALLOW', 'ROLE', 'deliveryAssistant'),
('Vehicle', 'findById', 'READ', 'ALLOW', 'ROLE', 'administrative'),
('Vehicle', 'findById', 'READ', 'ALLOW', 'ROLE', 'deliveryAssistant'),
('Vehicle', '__get__active', 'READ', 'ALLOW', 'ROLE', 'employee'),
('Vehicle', 'updateAttributes', 'WRITE', 'ALLOW', 'ROLE', 'administrative'),
('Vehicle', 'updateAttributes', 'WRITE', 'ALLOW', 'ROLE', 'deliveryAssistant'),
('Vehicle', 'deleteById', 'WRITE', 'ALLOW', 'ROLE', 'administrative'),
('Vehicle', 'deleteById', 'WRITE', 'ALLOW', 'ROLE', 'deliveryAssistant'),
('Vehicle', 'create', 'WRITE', 'ALLOW', 'ROLE', 'administrative'),
('Vehicle', 'create', 'WRITE', 'ALLOW', 'ROLE', 'deliveryAssistant'),
('BankPolicy', 'find', 'READ', 'ALLOW', 'ROLE', 'administrative'),
('BankPolicy', 'find', 'READ', 'ALLOW', 'ROLE', 'deliveryAssistant'),
('VehicleState', 'find', 'READ', 'ALLOW', 'ROLE', 'administrative'),
('VehicleState', 'find', 'READ', 'ALLOW', 'ROLE', 'deliveryAssistant'),
('Ppe', 'find', 'READ', 'ALLOW', 'ROLE', 'administrative' ),
('Ppe', 'find', 'READ', 'ALLOW', 'ROLE', 'deliveryAssistant' ),
('Vehicle', 'deleteById', 'WRITE', 'ALLOW', 'ROLE', 'administrative'),
('Vehicle', 'deleteById', 'WRITE', 'ALLOW', 'ROLE', 'deliveryAssistant'),
('VehicleType', 'find', 'READ', 'ALLOW', 'ROLE', 'employee'),
('Vehicle', '__get__active', 'READ', 'ALLOW', 'ROLE', 'employee');
('DeliveryPoint', 'find', 'READ', 'ALLOW', 'ROLE', 'deliveryAssistant'),
('DeliveryPoint', 'find', 'READ', 'ALLOW', 'ROLE', 'administrative');
CREATE TABLE IF NOT EXISTS vehicleType (
id INT(11) PRIMARY KEY AUTO_INCREMENT,

View File

@ -48,6 +48,9 @@
"import": {
"type": "number"
},
"importCooler": {
"type": "number"
},
"vin": {
"type": "string"
},
@ -56,6 +59,9 @@
},
"vehicleTypeFk": {
"type": "number"
},
"deliveryPointFk": {
"type": "number"
}
},
"relations": {