Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.appsmith.external.views.FromRequest;
import com.appsmith.external.views.Git;
import com.appsmith.external.views.Views;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonView;
import lombok.AccessLevel;
Expand Down Expand Up @@ -79,7 +78,7 @@ public abstract class BaseDomain implements Persistable<String>, AppsmithDomain,
protected Set<Policy> policies = new HashSet<>();

@Override
@JsonIgnore
@JsonView(Views.Public.class)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sharat87 Now we are expecting this to be part of serialisation as well? i.e. git flows?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If yes then let's add the git annotation as well which works with the cleanup whitelisting

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a revert PR, reverting #34617. Git was not there before, so this revert isn't adding it either. Do we need it? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, AFAIR we don't require this for our ops. we should be good.

public boolean isNew() {
return this.getId() == null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ public void objectMapper_BeanCreated_WithPublicJsonViewAsDefault() throws JsonPr
userData.setUserPermissions(null);

String value = objectMapper.writeValueAsString(userData);
JSONAssert.assertEquals("{\"proficiency\":\"abcd\",\"role\":\"new_role\"}", value, true);
JSONAssert.assertEquals("{\"proficiency\":\"abcd\",\"role\":\"new_role\",\"new\":true}", value, true);
}
}