Skip to content

Commit

Permalink
add permission to policy
Browse files Browse the repository at this point in the history
  • Loading branch information
ununhexium committed Oct 31, 2024
1 parent d680d2a commit 4f50402
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import lombok.val;
import org.eclipse.edc.policy.engine.spi.PolicyEngine;
import org.eclipse.edc.policy.engine.spi.PolicyScope;
import org.eclipse.edc.policy.model.Permission;
import org.eclipse.edc.policy.model.Policy;
import org.eclipse.edc.protocol.dsp.http.spi.dispatcher.DspHttpRemoteMessageDispatcher;
import org.eclipse.edc.protocol.dsp.http.spi.serialization.JsonLdRemoteMessageSerializer;
Expand Down Expand Up @@ -99,7 +100,7 @@ private void setupSovityMessengerEmitter(ServiceExtensionContext context, Object
dspHttpRemoteMessageDispatcher.registerPolicyScope(
SovityMessageRequest.class,
MESSENGER_SCOPE,
(ignored) -> Policy.Builder.newInstance().build());
(ignored) -> Policy.Builder.newInstance().permission(Permission.Builder.newInstance().build()).build());

policyEngine.registerPostValidator(MESSENGER_SCOPE, (ignored1, ignored2) -> true);

Expand Down

0 comments on commit 4f50402

Please sign in to comment.