Skip to content

Commit

Permalink
Apply outstanding RFCs from nucypher#602.
Browse files Browse the repository at this point in the history
  • Loading branch information
derekpierre committed Dec 18, 2024
1 parent 5477f6f commit 36d30f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/taco/src/conditions/context/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { ConditionExpression } from '../condition-expr';
import {
CONTEXT_PARAM_FULL_MATCH_REGEXP,
CONTEXT_PARAM_PREFIX,
CONTEXT_PARAM_REGEXP,
USER_ADDRESS_PARAMS,
} from '../const';
import { JsonApiConditionType } from '../schemas/json-api';
Expand Down Expand Up @@ -190,14 +191,15 @@ export class ConditionContext {
}
}
if (condition.query) {
const queryParams = condition.query.match(':[a-zA-Z_]+');
const queryParams = condition.query.match(CONTEXT_PARAM_REGEXP);
if (queryParams) {
for (const param of queryParams) {
requestedParameters.add(param);
}
}
}
if (this.isContextParameter(condition.authorizationToken)) {
// always a context variable, so simply check whether defined
if (condition.authorizationToken) {
requestedParameters.add(condition.authorizationToken);
}
}
Expand Down

0 comments on commit 36d30f5

Please sign in to comment.