From a2a0b4d3c553ed68c2eef5f5bc1c8428c153e780 Mon Sep 17 00:00:00 2001 From: Thinh Tran Date: Wed, 15 May 2024 22:07:19 +0700 Subject: [PATCH] feat: added scope to ResourceAction Signed-off-by: Thinh Tran --- src/main/java/dev/cerbos/sdk/builders/ResourceAction.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/dev/cerbos/sdk/builders/ResourceAction.java b/src/main/java/dev/cerbos/sdk/builders/ResourceAction.java index 94dbb87..1bb468e 100644 --- a/src/main/java/dev/cerbos/sdk/builders/ResourceAction.java +++ b/src/main/java/dev/cerbos/sdk/builders/ResourceAction.java @@ -39,6 +39,11 @@ public ResourceAction withAttribute(String key, AttributeValue value) { return this; } + public ResourceAction withScope(String scope) { + this.resource.setScope(scope); + return this; + } + public ResourceAction withAttributes(Map attributes) { attributes.forEach(this::withAttribute); return this;