Skip to content

Commit 63eb80d

Browse files
committed
Merge branch 'develop' into 11634-api-get-available-file-categories
2 parents 8abf0a6 + 1507805 commit 63eb80d

File tree

15 files changed

+64
-35
lines changed

15 files changed

+64
-35
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Linking or unlinking a dataset or dataverse now requires the new "Link Dataset/Dataverse" permission.
2+
Previously, this action was covered by the "Publish Dataset/Dataverse" permission.
3+
Linking and publishing permissions can now be granted separately, allowing for more fine-grained access control.

doc/release-notes/11629-CSLFix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The styled citations available through the "View Styled Citations" menu were including extra characters, e.g. 'doi:' in the URL form of the PIDs in the citation. This is now fixed.

doc/sphinx-guides/source/admin/dataverses-datasets.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Moves a dataset whose id is passed to a Dataverse collection whose alias is pass
118118
Link a Dataset
119119
^^^^^^^^^^^^^^
120120

121-
Creates a link between a dataset and a Dataverse collection (see the :ref:`dataset-linking` section of the User Guide for more information). ::
121+
Creates a link between a dataset and a Dataverse collection (see the :ref:`dataset-linking` section of the User Guide for more information). Accessible to users with Link Dataset permission on the Dataverse collection. ::
122122

123123
curl -H "X-Dataverse-key: $API_TOKEN" -X PUT http://$SERVER/api/datasets/$linked-dataset-id/link/$linking-dataverse-alias
124124

@@ -155,7 +155,7 @@ It returns a list in the following format (new format as of v6.4):
155155
Unlink a Dataset
156156
^^^^^^^^^^^^^^^^
157157

158-
Removes a link between a dataset and a Dataverse collection. Accessible to users with Publish Dataset permissions. ::
158+
Removes a link between a dataset and a Dataverse collection. Accessible to users with Link Dataset permission on the Dataverse collection. ::
159159

160160
curl -H "X-Dataverse-key: $API_TOKEN" -X DELETE http://$SERVER/api/datasets/$linked-dataset-id/deleteLink/$linking-dataverse-alias
161161

doc/sphinx-guides/source/developers/making-releases.rst

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Some of the steps in this document are well-served by having their own dedicated
3737
There are a variety of reasons why a step might deserve its own dedicated issue:
3838

3939
- The step can be done by a team member other than the person doing the release.
40-
- Stakeholders might be interested in the status of a step (e.g. has the released been deployed to the demo site).
40+
- Stakeholders might be interested in the status of a step (e.g. has the release been deployed to the demo site).
4141

4242
Steps don't get their own dedicated issue if it would be confusing to have multiple people involved. Too many cooks in the kitchen, as they say. Also, some steps are so small the overhead of an issue isn't worth it.
4343

@@ -81,10 +81,11 @@ Developers express the need for an addition to release notes by creating a "rele
8181
The task at or near release time is to collect these snippets into a single file.
8282

8383
- Find the issue in GitHub that tracks the work of creating release notes for the upcoming release.
84-
- Create a branch, add a .md file for the release (ex. 5.10.1 Release Notes) in ``/doc/release-notes`` and write the release notes, making sure to pull content from the release note snippets mentioned above. Snippets may not include any issue number or pull request number in the text so be sure copy the number from the filename of the snippet into the final release note.
84+
- Create a branch, add a .md file for the release (ex. 5.10.1 Release Notes) in ``/doc/release-notes`` and write the release notes, making sure to pull content from the release note snippets mentioned above. Snippets may not include any issue number or pull request number in the text so be sure to copy the number from the filename of the snippet into the final release note.
8585
- Delete (``git rm``) the release note snippets as the content is added to the main release notes file.
8686
- Include instructions describing the steps required to upgrade the application from the previous version. These must be customized for release numbers and special circumstances such as changes to metadata blocks and infrastructure.
87-
- Take the release notes .md through the regular Code Review and QA process. That is, make a pull request. Here's an example: https://github.com/IQSS/dataverse/pull/10866
87+
- Make a pull request. Here's an example: https://github.com/IQSS/dataverse/pull/11613
88+
- Note that we won't merge the release notes until after we have confirmed that the upgrade instructions are valid by performing a couple upgrades.
8889

8990
Deploy Release Candidate to Internal
9091
------------------------------------
@@ -93,6 +94,8 @@ Deploy Release Candidate to Internal
9394

9495
To upgrade internal, go to /doc/release-notes, open the release-notes.md file for the current release and perform all the steps under "Upgrade Instructions".
9596

97+
Note that we haven't bumped the version yet so you won't be able to follow the steps exactly.
98+
9699
Deploy Release Candidate to Demo
97100
--------------------------------
98101

@@ -115,7 +118,14 @@ This will build the war file, and then automatically deploy it on dataverse-inte
115118

116119
You can scp the war file to the demo server or download it from https://jenkins.dataverse.org/job/IQSS_Dataverse_Internal/ws/target/
117120

118-
ssh into the demo server and follow the upgrade instructions in the release notes.
121+
ssh into the demo server and follow the upgrade instructions in the release notes. Again, note that we haven't bumped the version yet.
122+
123+
Merge Release Notes (Once Ready)
124+
--------------------------------
125+
126+
If the upgrade instructions are perfect, simply merge the release notes.
127+
128+
If the upgrade instructions aren't quite right, work with the authors of the release notes until they are good enough, and then merge.
119129

120130
Prepare Release Branch
121131
----------------------
@@ -147,9 +157,9 @@ Return to the parent pom and make the following change, which is necessary for p
147157

148158
(Before you make this change the value should be ``${parsedVersion.majorVersion}.${parsedVersion.nextMinorVersion}``. Later on, after cutting a release, we'll change it back to that value.)
149159

150-
For a regular release, make the changes above in the release branch you created, but hold off for a moment on making a pull requests because Jenkins will fail because it will be testing the previous release.
160+
For a regular release, make the changes above in the release branch you created, but hold off for a moment on making a pull request because Jenkins will fail because it will be testing the previous release.
151161

152-
In the dataverse-ansible repo make bump the version in `jenkins.yml <https://github.com/gdcc/dataverse-ansible/blob/develop/tests/group_vars/jenkins.yml>`_ and make a pull request such as https://github.com/gdcc/dataverse-ansible/pull/386. Wait for it to be merged. Note that bumping on the Jenkins side like this will mean that all pull requests will show failures in Jenkins until they are updated to the version we are releasing.
162+
In the dataverse-ansible repo bump the version in `jenkins.yml <https://github.com/gdcc/dataverse-ansible/blob/develop/tests/group_vars/jenkins.yml>`_ and make a pull request such as https://github.com/gdcc/dataverse-ansible/pull/386. Wait for it to be merged. Note that bumping on the Jenkins side like this will mean that all pull requests will show failures in Jenkins until they are updated to the version we are releasing.
153163

154164
Once dataverse-ansible has been merged, return to the branch you created above ("10852-bump-to-6.4" or whatever) and make a pull request. Ensure that all tests are passing and then put the PR through the normal review and QA process.
155165

@@ -311,7 +321,7 @@ Create a new branch (any name is fine but ``prepare-next-iteration`` is suggeste
311321

312322
- modules/dataverse-parent/pom.xml -> ``<profiles>`` -> profile "ct" -> ``<properties>`` -> Set ``<base.image.version>`` to ``${parsedVersion.majorVersion}.${parsedVersion.nextMinorVersion}``
313323

314-
Create a pull request and put it through code review, like usual. Give it a milestone of the next release, the one **after** the one we're working on. Once the pull request has been approved, merge it. It should the the first PR merged of the next release.
324+
Create a pull request and put it through code review, like usual. Give it a milestone of the next release, the one **after** the one we're working on. Once the pull request has been approved, merge it. It should be the first PR merged of the next release.
315325

316326
For more background, see :ref:`base-image-supported-tags`. For an example, see https://github.com/IQSS/dataverse/pull/10896
317327

doc/sphinx-guides/source/user/dataverse-management.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ Dataset linking allows a Dataverse collection owner to "link" their Dataverse co
215215

216216
For example, researchers working on a collaborative study across institutions can each link their own individual institutional Dataverse collections to the one collaborative dataset, making it easier for interested parties from each institution to find the study.
217217

218-
In order to link a dataset, you will need your account to have the "Publish Dataset" permission on the Dataverse collection that is doing the linking. If you created the Dataverse collection then you should have this permission already, but if not then you will need to ask the admin of that Dataverse collection to assign that permission to your account. You do not need any special permissions on the dataset being linked.
218+
In order to link a dataset, you will need your account to have the "Link Dataset" permission on the Dataverse collection that is doing the linking. If you created the Dataverse collection then you should have this permission already, but if not then you will need to ask the admin of that Dataverse collection to assign that permission to your account. You do not need any special permissions on the dataset being linked.
219219

220220
To link a dataset to your Dataverse collection, you must navigate to that dataset and click the white "Link" button in the upper-right corner of the dataset page. This will open up a window where you can type in the name of the Dataverse collection that you would like to link the dataset to. Select your Dataverse collection and click the save button. This will establish the link, and the dataset will now appear under your Dataverse collection.
221221

scripts/api/data/role-curator.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"alias":"curator",
33
"name":"Curator",
4-
"description":"For datasets, a person who can edit License + Terms, edit Permissions, and publish datasets.",
4+
"description":"For datasets, a person who can edit License + Terms, edit Permissions, and publish and link datasets.",
55
"permissions":[
66
"ViewUnpublishedDataset",
77
"EditDataset",
88
"DownloadFile",
99
"DeleteDatasetDraft",
1010
"PublishDataset",
11+
"LinkDataset",
1112
"ManageDatasetPermissions",
1213
"ManageFilePermissions",
1314
"AddDataverse",

src/main/java/edu/harvard/iq/dataverse/DataCitation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ public JsonObject getCSLJsonFormat() {
749749
if (seriesTitles != null) {
750750
itemBuilder.containerTitle(formatString(seriesTitles.get(0), true));
751751
}
752-
itemBuilder.version(version).DOI(persistentId.asString());
752+
itemBuilder.version(version).DOI(persistentId.asRawIdentifier());
753753
if (keywords != null) {
754754
itemBuilder
755755
.categories(keywords.stream().map(keyword -> formatString(keyword, true)).toArray(String[]::new));

src/main/java/edu/harvard/iq/dataverse/DataverseServiceBean.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ public List<Dataverse> filterDataversesForLinking(String query, DataverseRequest
512512

513513
for (Dataverse res : results) {
514514
if (!remove.contains(res)) {
515-
if (this.permissionService.requestOn(req, res).has(Permission.PublishDataset)) {
515+
if (this.permissionService.requestOn(req, res).has(Permission.LinkDataset)) {
516516
dataverseList.add(res);
517517
}
518518
}
@@ -525,7 +525,7 @@ public List<Dataverse> filterDataversesForUnLinking(String query, DataverseReque
525525
List<Dataverse> dataverseList = new ArrayList<>();
526526
if (alreadyLinkeddv_ids != null && !alreadyLinkeddv_ids.isEmpty()) {
527527
alreadyLinkeddv_ids.stream().map((testDVId) -> this.find(testDVId)).forEachOrdered((dataverse) -> {
528-
if (this.permissionService.requestOn(req, dataverse).has(Permission.PublishDataset)) {
528+
if (this.permissionService.requestOn(req, dataverse).has(Permission.LinkDataset)) {
529529
dataverseList.add(dataverse);
530530
}
531531
});

src/main/java/edu/harvard/iq/dataverse/authorization/Permission.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ public enum Permission implements java.io.Serializable {
4848
ManageDatasetPermissions(BundleUtil.getStringFromBundle("permission.managePermissionsDataset"), true, Dataset.class),
4949
ManageFilePermissions(BundleUtil.getStringFromBundle("permission.managePermissionsDataFile"), true, DataFile.class),
5050
PublishDataverse(BundleUtil.getStringFromBundle("permission.publishDataverse"), true, Dataverse.class),
51+
LinkDataverse(BundleUtil.getStringFromBundle("permission.linkDataverse"), true, Dataverse.class),
5152
PublishDataset(BundleUtil.getStringFromBundle("permission.publishDataset"), true, Dataset.class, Dataverse.class),
53+
LinkDataset(BundleUtil.getStringFromBundle("permission.linkDataset"), true, Dataset.class, Dataverse.class),
5254
// Delete
5355
DeleteDataverse(BundleUtil.getStringFromBundle("permission.deleteDataverse"), true, Dataverse.class),
5456
DeleteDatasetDraft(BundleUtil.getStringFromBundle("permission.deleteDataset"), true, Dataset.class);

src/main/java/edu/harvard/iq/dataverse/engine/command/impl/DeleteDatasetLinkingDataverseCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
* @author sarahferry
2424
*/
2525

26-
@RequiredPermissions( Permission.PublishDataset )
26+
@RequiredPermissions( Permission.LinkDataset )
2727
public class DeleteDatasetLinkingDataverseCommand extends AbstractCommand<Dataset>{
2828
private final DatasetLinkingDataverse doomed;
2929
private final Dataset editedDs;
3030
private final boolean index;
3131

3232
public DeleteDatasetLinkingDataverseCommand(DataverseRequest aRequest, Dataset editedDs , DatasetLinkingDataverse doomed, boolean index) {
33-
super(aRequest, editedDs);
33+
super(aRequest, doomed.getLinkingDataverse());
3434
this.editedDs = editedDs;
3535
this.doomed = doomed;
3636
this.index = index;

0 commit comments

Comments
 (0)