Skip to content

Commit

Permalink
set registeredOperation and forbiddenOperation on requestContext
Browse files Browse the repository at this point in the history
Those fields were added by
#2768
  • Loading branch information
cheapsteak committed Jun 6, 2019
1 parent 0d6d305 commit 54503cf
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ export default function plugin(options: Options = Object.create(null)) {
logger.debug(
`${logHash}: Permitting operation found in local registry.`,
);
if (!options.dryRun) {
requestContext.metrics.registeredOperation = true;
}
return;
}

Expand Down Expand Up @@ -210,6 +213,7 @@ export default function plugin(options: Options = Object.create(null)) {
);

if (!options.dryRun) {
requestContext.metrics.forbiddenOperation = true;
throw new ForbiddenError('Execution forbidden');
} else {
logger.debug(
Expand Down

0 comments on commit 54503cf

Please sign in to comment.