Skip to content

Commit

Permalink
more workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
ununhexium committed Nov 1, 2024
1 parent 4f50402 commit e5e09ef
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.eclipse.edc.runtime.metamodel.annotation.Provides;
import org.eclipse.edc.spi.agent.ParticipantAgentService;
import org.eclipse.edc.spi.iam.IdentityService;
import org.eclipse.edc.spi.iam.RequestScope;
import org.eclipse.edc.spi.message.RemoteMessageDispatcherRegistry;
import org.eclipse.edc.spi.monitor.Monitor;
import org.eclipse.edc.spi.system.ServiceExtension;
Expand Down Expand Up @@ -102,7 +103,12 @@ private void setupSovityMessengerEmitter(ServiceExtensionContext context, Object
MESSENGER_SCOPE,
(ignored) -> Policy.Builder.newInstance().permission(Permission.Builder.newInstance().build()).build());

policyEngine.registerPostValidator(MESSENGER_SCOPE, (ignored1, ignored2) -> true);
policyEngine.registerPostValidator(
MESSENGER_SCOPE,
(ignored, policyContext) -> {
policyContext.getContextData(RequestScope.Builder.class).scope("sovity.messenger:send");
return true;
});

typeTransformerRegistry.register(new JsonObjectFromSovityMessageRequest());

Expand Down

0 comments on commit e5e09ef

Please sign in to comment.