Skip to content

Commit

Permalink
reverting the deaccessioned version experiment. #9725
Browse files Browse the repository at this point in the history
  • Loading branch information
landreev committed Jul 26, 2023
1 parent a061198 commit 57ea454
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions src/main/java/edu/harvard/iq/dataverse/DatasetPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -1905,23 +1905,14 @@ private String init(boolean initFull) {

versionId = workingVersion.getId();

// For deaccessioned versions, we only show the files to the
// authors/contributors/admins - those who have the write
// permission on the dataset. So if this one is deaccessioned,
// and this user is not supposed to be shown the files, we
// can stop here and use the dataset and verison we have just
// initialized. Otherwise, we need to initialize the files, and
// we will do that with the findDeep() method below.
if (!workingVersion.isDeaccessioned() || canUpdateDataset()) {
this.workingVersion = null;
this.dataset = null;
}

}

// ... And now the "real" working version lookup:

if (workingVersion == null && versionId != null) {
if (versionId != null) {
this.workingVersion = datasetVersionService.findDeep(versionId);
dataset = workingVersion.getDataset();

Expand Down Expand Up @@ -1952,16 +1943,6 @@ private String init(boolean initFull) {
break;
}

//this.dataset = this.workingVersion.getDataset();

// end: Set the workingVersion and Dataset
// ---------------------------------------
// Is the DatasetVersion or Dataset null?
//
if (workingVersion == null || this.dataset == null) {
return permissionsWrapper.notFound();
}

// Is the Dataset harvested?

if (dataset.isHarvested()) {
Expand Down

0 comments on commit 57ea454

Please sign in to comment.