Dear Dataverse community,
we are struggling a bit with the fact that only users with the Curator or Admin role get the "MangageFilePermissions". We don't give our authors/submitters the role "Curator" because we do the curation ourselves and there are too many rights associated with this role. However, the authors/suppliers (role = "Contributor") should be able to handle access requests to restricted files themselves. Apparently, the "ManageFilePermissions" permission is necessary for this. We would like to see another role that has the same rights as "Contributor", just extended by this right.
Or is there the possibility to define roles yourself?
Leonhard Maylein
Heidelberg University Library
--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/d98d94f212f14d44b3abd9d4a2477b5d%40ub.uni-heidelberg.de.
Hi Phil,
thank you very much, this helps me a lot. I am probably just being too clumsy. But I can't find the documentation on how to create custom roles with the appropriate permissions.
Leonhard Maylein
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/635a85c147fb4e0a871937fa22381050%40ub.uni-heidelberg.de.
Many thanks,
I have now tried to import a new role based on https://guides.dataverse.org/en/latest/api/native-api.html#create-global-role. Unfortunately my attempts fail. I do not get an error message (the api response is "{}"), but the new role is not available.
The documentation says: "The data POSTed are assumed to be a role JSON."
However, it is not clear to me what exactly such a JSON looks like.
I tried the following (based on what "List Global Roles" gives me):
curl -H 'Content-Type: application/json' -X POST -F 'file=@dv_role_FilePermissionManager.json' "http://localhost:8080/api/admin/roles"
with dv_role_FilePermissionManager.json containing either
{"data":[{"alias":"contribAndFilePermission","name":"FilePermissionManager","permissions":["ViewUnpublishedDataset","DownloadFile","EditDataset","ManageFilePermissions","DeleteDatasetDraft"],"description":"For datasets, a person who can edit
License + Terms, and then submit them for review and who can also alter the file permissions.","id":100}]}
or
{"data":[{"alias":"contribAndFilePermission","name":"FilePermissionManager","permissions":["ViewUnpublishedDataset","DownloadFile","EditDataset","ManageFilePermissions","DeleteDatasetDraft"],"description":"For datasets, a person who can edit
License + Terms, and then submit them for review and who can also alter the file permissions.","id":100}]}
Both variants also without the id attribute, because I'm not sure if Dataverse assigns it automatically.
Leonhard Maylein
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/PH7PR19MB65624D25F43F2917B9CF12C8BF51A%40PH7PR19MB6562.namprd19.prod.outlook.com.
Dear Phil, Dear Jim,
I have made one step further. I'm sorry to have to ask again.
This is my role json, now:
{"alias":"contribAndFilePermission","name":"Contributor + FilePermissionManager","description":"For datasets, a person who can edit License + Terms, and then submit them for review and who can also alter the file permissions.","permissions":["ViewUnpublishedDataset","DownloadFile","EditDataset","ManageFilePermissions","DeleteDatasetDraft"]}
All permissions seem to me to be spelled correctly.
The request now results in:
{"status":"ERROR","message":"Exception thrown from bean: javax.validation.ConstraintViolationException: One or more Bean Validation constraints were violated while executing Automatic Bean Validation on callback event: prePersist for class: edu.harvard.iq.dataverse.authorization.DataverseRole.
Please refer to the embedded constraint violations for details."}
The server log says:
Leo
One thing I see - the alias is constrained to a length of 16: https://github.com/IQSS/dataverse/blob/fd190a39d4d89051072d9788181a2a7763f2af69/src/main/java/edu/harvard/iq/dataverse/authorization/DataverseRole.java#L110
-- Jim
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/c2a8968cfce247af8bdac685028cfd89%40ub.uni-heidelberg.de.
Yes, that was the problem. Thank you very much.
Leo