Skip to content

Commit

Permalink
fix: remove data from ACS check
Browse files Browse the repository at this point in the history
  • Loading branch information
Arun-KumarH committed Dec 11, 2024
1 parent 6b1ebe6 commit d561979
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions cfg/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"items.[0].tokens",
"messages.[0].tokens",
"request.items.[0].tokens",
"request.items.[0].data",
"response.payload.token",
"response.payload.tokens",
"request.subject.token",
Expand Down
6 changes: 3 additions & 3 deletions src/schedulingService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export class SchedulingService implements SchedulingServiceServiceImplementation
try {
if (!ctx) { ctx = {}; };
ctx.subject = subject;
ctx.resources = request?.items;
ctx.resources = request?.items?.map((data, ...job) => job);
acsResponse = await checkAccessRequest(ctx, [{
resource: 'job',
id: request.items.map(item => item.id)
Expand Down Expand Up @@ -1156,7 +1156,7 @@ export class SchedulingService implements SchedulingServiceServiceImplementation
try {
if (!ctx) { ctx = {}; };
ctx.subject = subject;
ctx.resources = request?.items;
ctx.resources = request?.items?.map((data, ...obj) => obj);
acsResponse = await checkAccessRequest(ctx,
[{ resource: 'job', id: request.items.map(item => item.id) }],
AuthZAction.MODIFY, Operation.isAllowed);
Expand Down Expand Up @@ -1240,7 +1240,7 @@ export class SchedulingService implements SchedulingServiceServiceImplementation
try {
if (!ctx) { ctx = {}; };
ctx.subject = subject;
ctx.resources = request.items;
ctx.resources = request?.items?.map((data, ...job) => job);;
acsResponse = await checkAccessRequest(ctx,
[{ resource: 'job', id: request.items.map(item => item.id) }],
AuthZAction.MODIFY, Operation.isAllowed);
Expand Down

0 comments on commit d561979

Please sign in to comment.