|
26 | 26 |
|
27 | 27 | import java.util.Map;
|
28 | 28 |
|
| 29 | +import static org.eclipse.edc.connector.contract.spi.validation.ContractValidationService.NEGOTIATION_SCOPE; |
29 | 30 | import static org.eclipse.edc.policy.engine.spi.PolicyEngine.ALL_SCOPES;
|
30 | 31 |
|
31 | 32 | @Extension(value = PossiblePolicyExtension.EXTENSION_NAME)
|
@@ -54,13 +55,13 @@ public String name() {
|
54 | 55 | public void initialize(ServiceExtensionContext context) {
|
55 | 56 | var monitor = context.getMonitor();
|
56 | 57 |
|
57 |
| - ruleBindingRegistry.bind("use", ALL_SCOPES); |
| 58 | + ruleBindingRegistry.bind("use", NEGOTIATION_SCOPE); |
58 | 59 |
|
59 | 60 | for (Map.Entry<String, String> entry : CONSTRAINT_KEY_MAP.entrySet()) {
|
60 |
| - ruleBindingRegistry.bind(entry.getKey(), ALL_SCOPES); |
61 |
| - policyEngine.registerFunction(ALL_SCOPES, Permission.class, entry.getKey(), |
| 61 | + ruleBindingRegistry.bind(entry.getKey(), NEGOTIATION_SCOPE); |
| 62 | + policyEngine.registerFunction(NEGOTIATION_SCOPE, Permission.class, entry.getKey(), |
62 | 63 | new ClientClaimConstraintFunction<>(monitor, entry.getValue(), VERBOSE));
|
63 |
| - policyEngine.registerFunction(ALL_SCOPES, Prohibition.class, entry.getKey(), |
| 64 | + policyEngine.registerFunction(NEGOTIATION_SCOPE, Prohibition.class, entry.getKey(), |
64 | 65 | new ClientClaimConstraintFunction<>(monitor, entry.getValue(), VERBOSE));
|
65 | 66 | }
|
66 | 67 | }
|
|
0 commit comments