samvera-deprecated / curation_concerns

A Hydra-based Rails Engine that extends an application, adding the ability to Create, Read, Update and Destroy (CRUD) objects (based on Hydra::Works) and providing a generator for defining object types with custom workflows, views, access controls, etc.
Other
15 stars 27 forks source link

Edit Work that has inactive rights. #775

Closed grosscol closed 8 years ago

grosscol commented 8 years ago

Descriptive summary

Editing a work that has inactive rights will force a user to either cancel the edits or select a rights statement from the list of active rights.

CC HEAD.

Expected behavior

Edit the metadata of a work without having to choose a new rights statement.

Actual behavior

Editting the metadata requires selection of a currently active rights statement. In the case of legacy Works, this will require the user to change the rights from what was originally granted for the Work.

Steps to reproduce the behavior

  1. Create Work
  2. Set rights selection to an rights statement with active: false. (via rails console)
  3. Edit the Work

    Related work

This is a consequence of #767. The contributor neglected to bring this issue to light or have a solution for it at the time of the PR. Not going to name any names, but it was me.

jenlindner commented 8 years ago

Might not be testing this well, but I can't reproduce the error. I'm looking at this in a test app inside Sufia, after modifying the rights.yml in my curation_concerns gem to have an inactive id. Creating a work with the inactive id is fine (is that a sign that my setup isn't using the .yml file?), editing it with the inactive id is fine, creating one with an active id and changing it to the inactive one in the console is fine - nothing prevents a save.

Any thoughts?

jcoyne commented 8 years ago

Did you restart your rails server after changing rights.yml? AFAIK that file is only parsed once during server startup.

jenlindner commented 8 years ago

Yes, I did. Changing the right to inactive in the console of the test app also didn't work though, something is either not right in my setup or it got fixed in the last week. Is there a way to reproduce this other than things I'm doing, @grosscol?

jenlindner commented 8 years ago

Nvm, the rights.yml needs be changed in the test app, not the gem.

grosscol commented 8 years ago

You should also be able to reproduce this in Curation Concern's internal test app. There is a rights selection method in the form for New Generic Work