From e527f609603f8c099427eb112bc465a977bbf586 Mon Sep 17 00:00:00 2001 From: Michael Heppler Date: Mon, 3 Dec 2018 17:03:00 -0500 Subject: [PATCH 1/3] Added render logic to fix dataset lock msgs displaying to users without permissions [ref #4403] --- src/main/java/Bundle.properties | 10 ++++++---- .../java/edu/harvard/iq/dataverse/DatasetPage.java | 10 +++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main/java/Bundle.properties b/src/main/java/Bundle.properties index 0929af869d5..f14bf718086 100755 --- a/src/main/java/Bundle.properties +++ b/src/main/java/Bundle.properties @@ -1179,7 +1179,7 @@ dataset.submitBtn=Submit for Review dataset.disabledSubmittedBtn=Submitted for Review dataset.submitMessage=You will not be able to make changes to this dataset while it is in review. dataset.submit.success=Your dataset has been submitted for review. -dataset.inreview.infoMessage=\u2013 This dataset is currently under review prior to publication. +dataset.inreview.infoMessage=The draft version of this dataset is currently under review prior to publication. dataset.submit.failure=Dataset Submission Failed - {0} dataset.submit.failure.null=Can't submit for review. Dataset is null. dataset.submit.failure.isReleased=Latest version of dataset is already released. Only draft versions can be submitted for review. @@ -1215,6 +1215,7 @@ dataset.share.datasetShare=Share Dataset dataset.share.datasetShare.tip=Share this dataset on your favorite social media networks. dataset.share.datasetShare.shareText=View this dataset. dataset.locked.message=Dataset Locked +dataset.locked.message.details=This dataset is locked prior to publication. dataset.locked.inReview.message=Submitted for Review dataset.publish.error=This dataset may not be published due to an error when contacting the {0} Service. Please try again. dataset.publish.error.doi=This dataset may not be published because the DOI update failed. @@ -1231,8 +1232,9 @@ dataset.compute.computeBatchListHeader=Compute Batch dataset.compute.computeBatchRestricted=This dataset contains restricted files you may not compute on because you have not been granted access. dataset.delete.error=Could not deaccession the dataset because the {0} update failed. dataset.publish.worldMap.deleteConfirm=Please note that your data and map on WorldMap will be removed due to restricted file access changes in this dataset version which you are publishing. Do you want to continue? -dataset.publish.workflow.inprogress=Publish workflow in progress -dataset.pidRegister.workflow.inprogress=Register/update file persistent identifiers workflow in progress +dataset.publish.workflow.message=Publish in Progress +dataset.publish.workflow.inprogress=This dataset is locked prior to publication. +dataset.pidRegister.workflow.inprogress=This dataset is locked until the file persistent identifiers have been registered or updated. dataset.versionUI.draft=Draft dataset.versionUI.inReview=In Review dataset.versionUI.unpublished=Unpublished @@ -1396,7 +1398,7 @@ file.rsyncUpload.step2=Download this file upload script: file.rsyncUpload.step2.downloadScriptButton=Download DCM Script file.rsyncUpload.step3=Open a terminal window in the same directory you saved the script and run this command: bash ./{0} file.rsyncUpload.step4=Follow the instructions in the script. It will ask for a full path (beginning with "/") to the directory containing your data. Note: this script will expire after 7 days. -file.rsyncUpload.inProgressMessage.summary=DCM File Upload +file.rsyncUpload.inProgressMessage.summary=File Upload in Progress file.rsyncUpload.inProgressMessage.details=This dataset is locked until the data files have been transferred and verified. file.rsyncUpload.httpUploadDisabledDueToRsyncFileExisting=HTTP upload is disabled for this dataset because you have already uploaded files via rsync. If you would like to switch to HTTP upload, please contact {0}. file.rsyncUpload.httpUploadDisabledDueToRsyncFileExistingAndPublished=HTTP upload is disabled for this dataset because you have already uploaded files via rsync and published the dataset. diff --git a/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java b/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java index 84462e3915e..4de40334c17 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java +++ b/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java @@ -1551,10 +1551,10 @@ private String init(boolean initFull) { } // Various info messages, when the dataset is locked (for various reasons): - if (dataset.isLocked()) { + if (dataset.isLocked() && canUpdateDataset()) { if (dataset.isLockedFor(DatasetLock.Reason.Workflow)) { JH.addMessage(FacesMessage.SEVERITY_WARN, BundleUtil.getStringFromBundle("dataset.locked.message"), - BundleUtil.getStringFromBundle("dataset.publish.workflow.inprogress")); + BundleUtil.getStringFromBundle("dataset.locked.message.details")); } if (dataset.isLockedFor(DatasetLock.Reason.InReview)) { JH.addMessage(FacesMessage.SEVERITY_WARN, BundleUtil.getStringFromBundle("dataset.locked.inReview.message"), @@ -1572,8 +1572,8 @@ private String init(boolean initFull) { datasetService.removeDatasetLocks(dataset.getId(), DatasetLock.Reason.pidRegister); }*/ if (dataset.isLockedFor(DatasetLock.Reason.pidRegister)) { - JH.addMessage(FacesMessage.SEVERITY_WARN, BundleUtil.getStringFromBundle("dataset.pidRegister.workflow.inprogress"), - BundleUtil.getStringFromBundle("dataset.publish.workflow.inprogress")); + JH.addMessage(FacesMessage.SEVERITY_WARN, BundleUtil.getStringFromBundle("dataset.publish.workflow.message"), + BundleUtil.getStringFromBundle("dataset.pidRegister.workflow.inprogress")); } } @@ -1942,7 +1942,7 @@ private String releaseDataset(boolean minor) { if ( result.isCompleted() ) { JsfHelper.addSuccessMessage(BundleUtil.getStringFromBundle("dataset.message.publishSuccess")); } else { - JH.addMessage(FacesMessage.SEVERITY_WARN, BundleUtil.getStringFromBundle("dataset.locked.message"), BundleUtil.getStringFromBundle("dataset.publish.workflow.inprogress")); + JH.addMessage(FacesMessage.SEVERITY_WARN, BundleUtil.getStringFromBundle("dataset.locked.message"), BundleUtil.getStringFromBundle("dataset.locked.message.details")); } } catch (CommandException ex) { From 3eb00e27ffbaf0585cc0511f5cdfe09998824689 Mon Sep 17 00:00:00 2001 From: Michael Heppler Date: Tue, 4 Dec 2018 12:58:08 -0500 Subject: [PATCH 2/3] Updated dataset lock warning msgs based on feedback [ref #4403] --- src/main/java/Bundle.properties | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/Bundle.properties b/src/main/java/Bundle.properties index 7cf7bf963bd..9f1064f9347 100755 --- a/src/main/java/Bundle.properties +++ b/src/main/java/Bundle.properties @@ -1220,7 +1220,7 @@ dataset.share.datasetShare=Share Dataset dataset.share.datasetShare.tip=Share this dataset on your favorite social media networks. dataset.share.datasetShare.shareText=View this dataset. dataset.locked.message=Dataset Locked -dataset.locked.message.details=This dataset is locked prior to publication. +dataset.locked.message.details=This dataset is locked until publication. dataset.locked.inReview.message=Submitted for Review dataset.publish.error=This dataset may not be published due to an error when contacting the {0} Service. Please try again. dataset.publish.error.doi=This dataset may not be published because the DOI update failed. @@ -1238,8 +1238,8 @@ dataset.compute.computeBatchRestricted=This dataset contains restricted files yo dataset.delete.error=Could not deaccession the dataset because the {0} update failed. dataset.publish.worldMap.deleteConfirm=Please note that your data and map on WorldMap will be removed due to restricted file access changes in this dataset version which you are publishing. Do you want to continue? dataset.publish.workflow.message=Publish in Progress -dataset.publish.workflow.inprogress=This dataset is locked prior to publication. -dataset.pidRegister.workflow.inprogress=This dataset is locked until the file persistent identifiers have been registered or updated. +dataset.publish.workflow.inprogress=This dataset is locked until publication. +dataset.pidRegister.workflow.inprogress=This dataset is locked while the file persistent identifiers are being registered or updated. dataset.versionUI.draft=Draft dataset.versionUI.inReview=In Review dataset.versionUI.unpublished=Unpublished @@ -1404,7 +1404,7 @@ file.rsyncUpload.step2.downloadScriptButton=Download DCM Script file.rsyncUpload.step3=Open a terminal window in the same directory you saved the script and run this command: bash ./{0} file.rsyncUpload.step4=Follow the instructions in the script. It will ask for a full path (beginning with "/") to the directory containing your data. Note: this script will expire after 7 days. file.rsyncUpload.inProgressMessage.summary=File Upload in Progress -file.rsyncUpload.inProgressMessage.details=This dataset is locked until the data files have been transferred and verified. +file.rsyncUpload.inProgressMessage.details=This dataset is locked while the data files are being transferred and verified. file.rsyncUpload.httpUploadDisabledDueToRsyncFileExisting=HTTP upload is disabled for this dataset because you have already uploaded files via rsync. If you would like to switch to HTTP upload, please contact {0}. file.rsyncUpload.httpUploadDisabledDueToRsyncFileExistingAndPublished=HTTP upload is disabled for this dataset because you have already uploaded files via rsync and published the dataset. file.rsyncUpload.rsyncUploadDisabledDueFileUploadedViaHttp=Upload with rsync + SSH is disabled for this dataset because you have already uploaded files via HTTP. If you would like to switch to rsync upload, then you must first remove all uploaded files from this dataset. Once this dataset is published, the chosen upload method is permanently locked in. From e836d077a3b626ea01d3f66d3e60f078d6d685a1 Mon Sep 17 00:00:00 2001 From: Stephen Kraffmiller Date: Tue, 18 Dec 2018 12:10:16 -0500 Subject: [PATCH 3/3] #4403 typo in search include fragment --- src/main/webapp/search-include-fragment.xhtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/search-include-fragment.xhtml b/src/main/webapp/search-include-fragment.xhtml index 4400a7d53b9..4d9e94f899a 100644 --- a/src/main/webapp/search-include-fragment.xhtml +++ b/src/main/webapp/search-include-fragment.xhtml @@ -507,7 +507,7 @@ - + @@ -573,7 +573,7 @@ - +