Reputation: 4149
Is there a way to disable users (other than Sysadmins) from setting datasets/packages as Public (or delete the dataset) in CKAN (basically and Editor that can't delete or set Public)? Somewhere in the source files I can see the logic related to this? Any extensions that would require user edits be approved by data stewards of a dataset before it is actually displayed to anyone on the platform (so that we could just include checking that the edit did no include setting the data/package as Public in the moderation process)?
We want to give as much editing control to Editor-privileged users as possible while still preventing them from editing the Public/Private setting for data/packages as we want only sysadmins to have this control for certain data privacy and responsibility reasons.
From the moderation route, saw this extension, but unsure if the moderation is before it is displayed (and don't have a server to test this on atm). Unsure if there are any other packages like this as the CKAN extension searchbar seems to only hit on exact words, so seems easy to miss extension that are conceptually similar but titled very differently.
Anyone with more CKAN experience know how this could be achieved (else where approximately in the CKAN source code I could start looking into adding a new extension for this)?
Upvotes: 0
Views: 332
Reputation: 4149
Made my own extension to do what I needed: https://github.com/reedv/ckanext-publicrestrictiondatasets
Adds restrictions to datasets so that only sysadmin users can set visibility to Public. This is in order to make CKAN's behavior match closer how it is described here (https://ckan.org/portfolio/publish-and-manage-data/).
Admins can approve datasets for publication with our bulk editing tool which let’s you search, facets and pick datasets to become public or private.
Upvotes: 0