uclibs/curate_uc — pull request #33 by jamesvanmil (2014-04-08 17:32:48+00:00)
Title: Feature/#29 permissions

For both works and collections, the default checkbox is being selected based on a default permissions view on the @collections/@curation_concern var, e.g.:

https://github.com/projecthydra/curate/blob/1b0822d0c6749b3919f42578948cc91c422d5d29/app/views/curate/collections/_form_permission.html.erb#L22

It looks like private? is returning true because the permissions have not already been set otherwise:

https://github.com/projecthydra/hydra-head/blob/506c67ac8338e9ae8d38c1b3c9b34a4542328088/hydra-access-controls/app/models/concerns/hydra/access_controls/access_right.rb#L50

I've addressed this by setting the visibility explicitly before the form is called, with, for example:

<% @collection.visibility = Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC %>

And I've manually confirmed that the selected privacy sticks if you change it during item creation. I haven't written any tests for this feature.