Skip to content

Commit 9dd82c7

Browse files
committed
fix version
update test
1 parent bc956c0 commit 9dd82c7

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ plugins {
2727
// be published
2828
group = 'io.permit'
2929
// sets the java package version automatically (looks at the git repo, latest tags, commit hashes, etc)
30-
version gitVersion()
30+
version '1.1.0'
3131

3232
repositories {
3333
// Use Maven Central for resolving dependencies.

src/test/java/io/permit/sdk/PermissionCheckE2ETest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ void testPermissionCheckRBAC() {
4242
actions.put("update", new ActionBlockEditable());
4343
actions.put("delete", new ActionBlockEditable());
4444

45+
4546
// resource attributes
46-
HashMap<String, AttributeBlockEditable> attributes = new HashMap<>();
47+
HashMap<String, Object> attributes = new HashMap<String,Object>();
4748
attributes.put(
4849
"private",
4950
new AttributeBlockEditable().withType(AttributeType.BOOL).withDescription("whether the document is private")
@@ -55,7 +56,6 @@ void testPermissionCheckRBAC() {
5556
)
5657
.withUrn("prn:gdrive:document")
5758
.withDescription("google drive document")
58-
.withAttributes(attributes)
5959
);
6060
ResourceRead document = permit.api.resources.create(resourceInput);
6161

@@ -158,10 +158,12 @@ void testPermissionCheckRBAC() {
158158

159159
// positive permission check (will be true because elon is a viewer, and a viewer can read a document)
160160
logger.info("testing positive permission check");
161+
HashMap<String,Object> resourceAttrs = new HashMap<String,Object>();
162+
resourceAttrs.put("sdfa", new ArrayList<String>(Arrays.asList("sdf","sdf")));
161163
assertTrue(permit.check(
162164
User.fromString("auth0|elon"),
163165
"read",
164-
new Resource.Builder("document").withTenant(tenant.key).build()
166+
new Resource.Builder("document").withTenant(tenant.key).withAttributes(resourceAttrs).build()
165167
));
166168

167169
logger.info("testing positive permission check with complete user object");

0 commit comments

Comments
 (0)