public static GrantRequest buildGrantRequest(UserPermission userPermission,
    boolean mergeExistingPermissions) {
    return GrantRequest.newBuilder().setUserPermission(toUserPermission(userPermission))
      .setMergeExistingPermissions(mergeExistingPermissions).build();
  }
Convert a client user permission to a user permission proto
@param perm the client UserPermission
@return the protobuf UserPermission
hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/ShadedAccessControlUtil.java