refs #5287 permisos añadidos
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alexandre Riera 2023-02-28 12:46:48 +01:00
parent 96e103d76e
commit d5ea59e284
4 changed files with 16 additions and 9 deletions

View File

@ -1,9 +1,15 @@
ALTER TABLE `vn`.`worker` ADD locker INT UNSIGNED NULL UNIQUE;
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
VALUES
('DeviceProduction', '*', '*', 'ALLOW', 'ROLE', 'employee'),
('DeviceProductionModels', '*', '*', 'ALLOW', 'ROLE', 'employee'),
('DeviceProductionState', '*', '*', 'ALLOW', 'ROLE', 'employee'),
('DeviceProductionUser', '*', '*', 'ALLOW', 'ROLE', 'employee'),
('Worker', 'deallocatePDA', '*', 'ALLOW', 'ROLE', 'employee'),
('Worker', 'allocatePDA', '*', 'ALLOW', 'ROLE', 'employee');
('DeviceProduction', '*', '*', 'ALLOW', 'ROLE', 'hr'),
('DeviceProductionModels', '*', '*', 'ALLOW', 'ROLE', 'hr'),
('DeviceProductionState', '*', '*', 'ALLOW', 'ROLE', 'hr'),
('DeviceProductionUser', '*', '*', 'ALLOW', 'ROLE', 'hr'),
('DeviceProduction', '*', '*', 'ALLOW', 'ROLE', 'productionAssi'),
('DeviceProductionModels', '*', '*', 'ALLOW', 'ROLE', 'productionAssi'),
('DeviceProductionState', '*', '*', 'ALLOW', 'ROLE', 'productionAssi'),
('DeviceProductionUser', '*', '*', 'ALLOW', 'ROLE', 'productionAssi'),
('Worker', 'deallocatePDA', '*', 'ALLOW', 'ROLE', 'hr'),
('Worker', 'allocatePDA', '*', 'ALLOW', 'ROLE', 'hr'),
('Worker', 'deallocatePDA', '*', 'ALLOW', 'ROLE', 'productionAssi'),
('Worker', 'allocatePDA', '*', 'ALLOW', 'ROLE', 'productionAssi');

View File

@ -7,7 +7,7 @@ describe('Worker pda path', () => {
beforeAll(async() => {
browser = await getBrowser();
page = browser.page;
await page.loginAndModule('employee', 'worker');
await page.loginAndModule('hr', 'worker');
await page.accessToSearchResult('employeeNick');
await page.accessToSection('worker.card.pda');
});

View File

@ -10,7 +10,7 @@
icon="delete"
vn-tooltip="Deallocate PDA"
ng-click="$ctrl.deallocatePDA()"
vn-acl="employee">
vn-acl="hr, productionAssi">
</vn-icon-button>
</append>
</vn-textfield>
@ -21,6 +21,7 @@
<vn-card class="vn-pa-lg">
<vn-horizontal>
<vn-autocomplete
vn-acl="hr, productionAssi"
ng-model="$ctrl.newPDA"
url="DeviceProductions"
fields="['id', 'modelFk', 'serialNumber']"

View File

@ -148,7 +148,7 @@
"state": "worker.card.pda",
"component": "vn-worker-pda",
"description": "PDA",
"acl": ["employee"]
"acl": ["hr", "productionAssi"]
}
]
}