@@ -8,8 +8,8 @@ public class Resource {
88 private String type ;
99 private String key = null ;
1010 private String tenant = null ;
11- private HashMap <String , String > attributes = null ;
12- private HashMap <String , String > context = new HashMap <>();
11+ private HashMap <String , Object > attributes = null ;
12+ private HashMap <String , Object > context = new HashMap <>();
1313
1414 public Resource (Builder builder ) {
1515 this .type = builder .type ;
@@ -31,11 +31,11 @@ public String getTenant() {
3131 return this .tenant ;
3232 }
3333
34- public HashMap <String , String > getAttributes () {
34+ public HashMap <String , Object > getAttributes () {
3535 return this .attributes ;
3636 }
3737
38- public HashMap <String , String > getContext () {
38+ public HashMap <String , Object > getContext () {
3939 return this .context ;
4040 }
4141
@@ -54,7 +54,7 @@ public Resource normalize(PermitConfig config) {
5454 : this .tenant ;
5555
5656 // copy tenant from resource.tenant to resource.context.tenant (until we change RBAC policy)
57- HashMap <String , String > safeContext = new HashMap <>();
57+ HashMap <String , Object > safeContext = new HashMap <>();
5858 safeContext .putAll (this .context );
5959 if (safeTenant != null && !this .context .containsKey ("tenant" )) {
6060 safeContext .put ("tenant" , safeTenant );
@@ -74,8 +74,8 @@ public static class Builder {
7474 private String type ;
7575 private String key = null ;
7676 private String tenant = null ;
77- private HashMap <String , String > attributes = null ;
78- private HashMap <String , String > context = new HashMap <>();
77+ private HashMap <String , Object > attributes = null ;
78+ private HashMap <String , Object > context = new HashMap <>();
7979
8080 private final String resourceDelimiter = ":" ;
8181
@@ -105,12 +105,12 @@ public Builder withTenant(String tenant) {
105105 return this ;
106106 }
107107
108- public Builder withAttributes (HashMap <String , String > attributes ) {
108+ public Builder withAttributes (HashMap <String , Object > attributes ) {
109109 this .attributes = attributes ;
110110 return this ;
111111 }
112112
113- public Builder withContext (HashMap <String , String > context ) {
113+ public Builder withContext (HashMap <String , Object > context ) {
114114 this .context = context ;
115115 return this ;
116116 }
0 commit comments