@@ -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