I'm wondering if there is a straightforward way to change the CKAN dataset form. I would be interested in adding extra visibility options than public and private: that is to say;
CKAN uses package_basic_fields.html
...
{% if show_visibility_selector %}
{% block package_metadata_fields_visibility %}
<div class="form-group control-medium">
<label for="field-private" class="form-label">{{ _('Visibility') }}</label>
<div class="controls">
<select id="field-private" name="private" class="form-control">
{% for option in [('True', _('Private')), ('False', _('Public'))] %}
<option value="{{ option[0] }}" {% if option[0] == data.private|trim %}selected="selected"{% endif %}>{{ option[1] }}</option>
### I want to add extra options here
{% endfor %}
</select>
</div>
</div>
{% endblock %}
{% endif %}
{% if show_organizations_selector and show_visibility_selector %}
...
ckanext-scheming doesn't talk about this either.
Any recommendation for me?
I believe you might be able to achieve this with a combination of ckanext-scheming and the interfaces provided by CKAN: IPackageController and possibly IPermissionLabels.
The idea is the following:
CKAN is not designed for something like this, but I am positive that this is a workaround that could work given some tweaking here and there.
EDIT: I confirm that I have managed to achieve a similar functionality following what I wrote above. In my case, I wanted to add the option of having public metadata for datasets, but not allow non authorized users to read resources nor download them. I also had to use IResourceController for this, manually checking if the user is allowed to have access to a resource and at what level.