feat: refs #7119 add VehicleState model with data source configuration #3328

Merged
jorgep merged 37 commits from 7119-createVehicle into dev 2025-02-06 09:24:11 +00:00
3 changed files with 21 additions and 20 deletions
Showing only changes of commit 3d2a7cfb66 - Show all commits

View File

@ -1,7 +1,10 @@
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
VALUES ('Vehicle', 'filter', 'READ', 'ALLOW', 'ROLE', 'delivery'),
('Vehicle', 'updateAttributes', 'WRITE', 'ALLOW', 'ROLE', 'delivery'),
('BankPolicy', 'find', 'READ', 'ALLOW', 'ROLE', 'delivery'),
('VehicleState', 'find', 'READ', 'ALLOW', 'ROLE', 'delivery' ),
('Ppe', 'find', 'READ', 'ALLOW', 'ROLE', 'delivery' ),
('Vehicle', 'deleteById', 'WRITE', 'ALLOW', 'ROLE', 'deliveryBoss');
VALUES ('Vehicle', 'filter', 'READ', 'ALLOW', 'ROLE', 'administrative'),
('Vehicle', 'find', 'READ', 'ALLOW', 'ROLE', 'administrative'),
('Vehicle', 'findById', 'READ', 'ALLOW', 'ROLE', 'administrative'),
('Vehicle', 'updateAttributes', 'WRITE', 'ALLOW', 'ROLE', 'administrative'),
('BankPolicy', 'find', 'READ', 'ALLOW', 'ROLE', 'administrative'),
('VehicleState', 'find', 'READ', 'ALLOW', 'ROLE', 'administrative' ),
('Ppe', 'find', 'READ', 'ALLOW', 'ROLE', 'administrative' ),
('Vehicle', 'deleteById', 'WRITE', 'ALLOW', 'ROLE', 'administrative'),
('Vehicle', '__get__active', 'READ', 'ALLOW', 'ROLE', 'employee');

View File

@ -94,7 +94,7 @@ module.exports = Self => {
}
}) || {};
const myFilter = mergeFilters(filter, {where: {...where, isActive: true}});
const myFilter = mergeFilters(filter, {where});
const stmt = new ParameterizedSQL(`
SELECT v.id,

View File

@ -104,19 +104,17 @@
"property": "ppeFk"
}
},
"scope": {
"scopes": {
"active": {
"fields": [
"id",
"numberPlate"
],
"where": {
"isActive": {
"neq": false
}
}
},
"acls": [
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}
]
}
}