fix: refs #7917 fix getRouteByAgency
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
ed8be4333f
commit
634e496ef0
|
@ -2,5 +2,6 @@ INSERT INTO salix.ACL (model, property, accessType, permission, principalType, p
|
|||
VALUES
|
||||
('Route', 'getTickets', 'READ', 'ALLOW', 'ROLE', 'delivery'),
|
||||
('AgencyTerm', 'filter', 'READ', 'ALLOW', 'ROLE', 'delivery'),
|
||||
('Route', 'summary', 'READ', 'ALLOW', 'ROLE', 'delivery');
|
||||
('Route', 'summary', 'READ', 'ALLOW', 'ROLE', 'delivery'),
|
||||
('AgencyTerm', 'getRouteByAgency', 'READ', 'ALLOW', 'ROLE', 'delivery');
|
||||
|
||||
|
|
|
@ -73,9 +73,10 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
filter = mergeFilters(ctx.args?.filter ?? {}, {where});
|
||||
const getRouteByAgency = await models.ACL.checkAccessAcl(ctx, 'Route', 'getRouteByAgency', 'WRITE');
|
||||
|
||||
const supplier = await Self.app.models.Supplier.isSupplier(ctx, myOptions);
|
||||
if (supplier) {
|
||||
if (supplier && getRouteByAgency) {
|
||||
if (!filter.where) filter.where = {};
|
||||
filter.where[`a.supplierFk`] = supplier.id;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue