bharos commented on code in PR #13901:
URL: https://github.com/apache/gravitino/pull/13901#discussion_r4301027715


##########
common/src/main/java/org/apache/gravitino/dto/policy/PolicyContentDTO.java:
##########
@@ -481,4 +484,68 @@ private ColumnMaskContent toDomainContent() {
       return PolicyContents.columnMask(expression);
     }
   }
+
+  /** Represents typed access-control policy content. */
+  @EqualsAndHashCode
+  @ToString
+  @Builder(setterPrefix = "with")
+  @AllArgsConstructor(access = lombok.AccessLevel.PRIVATE)
+  class AccessControlContentDTO implements PolicyContentDTO {
+
+    @JsonProperty("privileges")
+    private List<Privilege.Name> privileges;
+
+    @JsonProperty("applicableRoles")
+    private List<String> applicableRoles;
+
+    // Default constructor for Jackson deserialization only.
+    private AccessControlContentDTO() {}

Review Comment:
   Yes. Jackson invokes private no-arg constructors reflectively, so no 
visibility change is needed and same pattern as all seven sibling content DTOs 
in this file. TestPolicyDTO#testAccessControlPolicyDeserializesPrivilegeNames 
covers it by deserializing a raw JSON string; I confirmed it's the active path 
by removing the constructor locally, which makes that test fail 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to