Skip to content

Closes #3333 When a dataset is accessed via anonymized private URL, w…#3335

Open
lbownik wants to merge 3 commits into
developfrom
3333_hide_empty_metedata_sections_via_private_url
Open

Closes #3333 When a dataset is accessed via anonymized private URL, w…#3335
lbownik wants to merge 3 commits into
developfrom
3333_hide_empty_metedata_sections_via_private_url

Conversation

@lbownik

@lbownik lbownik commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

…e should not show empty metadata sections

fixed and refactored template edition view

…e should not show empty metadata sections

fixed and refactored template edition view
return permissionsWrapper.notFound();

final Optional<Dataverse> dataverse = this.dataverseRepo.findById(this.dataverseId);
if(! dataverse.isPresent()) {

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.

Missing space after if

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed


private Template selectedTemplate = null;
private Map<MetadataBlock, List<DatasetFieldsOfType>> mdbForView;
private ViewTemplateDialog vieTemplateDialog = new ViewTemplateDialog(EMPTY, emptyList());

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.

Typo in variable vieTemplateDialog -> viewTemplateDialog

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

}

public boolean shouldRenderField(final int blockIndex, final int fieldOfTypeIndex) {
return !isViewedFromAnonymizedPrivateUrl() ||

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.

is this correct check isViewedFromAnonymizedPrivateUrl
In shouldRenderField ther is negation of isViewedFromAnonymizedPrivateUrl
In shouldRenderBlock is oposit?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it is correct - refactored logical expression to make it obvious that both methods use the same expression

@rscipien rscipien assigned lbownik and unassigned rscipien Jul 27, 2026
@lbownik
lbownik requested a review from rscipien July 27, 2026 10:07
@lbownik lbownik assigned rscipien and unassigned lbownik Jul 27, 2026
@rscipien rscipien assigned lbownik and unassigned rscipien Jul 27, 2026
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