Skip to content

Internal publications#673

Open
hippolyteblot wants to merge 7 commits into
virtual-imaging-platform:developfrom
hippolyteblot:internal_publications
Open

Internal publications#673
hippolyteblot wants to merge 7 commits into
virtual-imaging-platform:developfrom
hippolyteblot:internal_publications

Conversation

@hippolyteblot
Copy link
Copy Markdown
Member

No description provided.

@hippolyteblot hippolyteblot marked this pull request as ready for review May 7, 2026 06:49
Copy link
Copy Markdown
Contributor

@axlbonnet axlbonnet left a comment

Choose a reason for hiding this comment

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

Some classic stuff :

  • add validation
  • move authorization in the business

Also, there is a bibtext feature currently, we should keep that for a v2 I think.

if (publication.getDoi() != null && !publication.getDoi().trim().isEmpty()) {
CoreUtil.assertOnlyLatin1Characters(publication.getDoi());
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i prefer the original flow : first verify and raise error, then correct characters.


ensureAdminOrAuthor(existing);
// Keep creator immutable to avoid ownership spoofing from request payload.
publication.setVipAuthor(existing.getVipAuthor());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

move those 2 lines in business

private String type;
private String typeName;
private String vipAuthor;
private String vipApplication;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we add some validation ?
Except doi, all should be mandatory.
Also can we make vipAuthor readonly ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Check read only with jsonView

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

NotBlank instead of NotNull

private String date;
private String doi;
private String authors;
private String type;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This one is kind of an enum (see EditPublicationLayout::PUBLICATION_TYPES).
I don't know what is the best way for you to deal with that on the frontend.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Create an enum in business (move from GWT) and an endpoint to serve the potential values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants