You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On calling up a new work form, a Hydra::AccessControl object is created in Fedora. This object is never used. On saving the new work, a new Hydra::AccessControl containing the Permissions objects gets created.
The object is created during rendering of base/_form_permission.html.erb
From the console:
Rendered /curation_concerns-1.6.2/app/views/curation_concerns/base/_form_media.html.erb (0.4ms)
Attempted to init base path dev, but it already exists
Load LDP (9.9ms) http://localhost:8984/rest/dev/dc/a9/fa/af/dca9faaf-0dc9-4d8d-b42a-0e1d06363498 Service: 69901153988960 [NEW OBJECT IS NOW IN FEDORA / SOLR]
Rendered curation_concerns/base/_form_permission.html.erb
Removing bits of the code to pinpoint where this happens, it is caused by the radio buttons rendering in _form_permission.html.erb. The object gets created even with just the following.
<%= f.radio_button :visibility, 'something' %>
Observed in 1.6.2 and 1.6.3
The same behavior is happens for Collection.
Expected behavior
Either the Hydra::AccessControl should be used to contain the subsequent permissions objects, or this object should not be created at all.
Actual behavior
An orphan Hydra::AccessControl is created.
Steps to reproduce the behavior
Bring up a vanilla curation concerns app
Run the generator to create a work
Hit 'new work'
Observe the console output
For additional debug output, copy _form_permission.html.erb locally and add
Descriptive summary
On calling up a new work form, a Hydra::AccessControl object is created in Fedora. This object is never used. On saving the new work, a new Hydra::AccessControl containing the Permissions objects gets created.
The object is created during rendering of base/_form_permission.html.erb
From the console:
Rendered /curation_concerns-1.6.2/app/views/curation_concerns/base/_form_media.html.erb (0.4ms)
Attempted to init base path
dev
, but it already existsLoad LDP (9.9ms) http://localhost:8984/rest/dev/dc/a9/fa/af/dca9faaf-0dc9-4d8d-b42a-0e1d06363498 Service: 69901153988960 [NEW OBJECT IS NOW IN FEDORA / SOLR]
Rendered curation_concerns/base/_form_permission.html.erb
Removing bits of the code to pinpoint where this happens, it is caused by the radio buttons rendering in _form_permission.html.erb. The object gets created even with just the following.
Observed in 1.6.2 and 1.6.3
The same behavior is happens for Collection.
Expected behavior
Either the Hydra::AccessControl should be used to contain the subsequent permissions objects, or this object should not be created at all.
Actual behavior
An orphan Hydra::AccessControl is created.
Steps to reproduce the behavior
For additional debug output, copy _form_permission.html.erb locally and add
<%= debug @curation_concern %>
Related work
See similar issue in this Hydra Tech thread:
https://groups.google.com/forum/#!topic/hydra-tech/dFRpIO8h2AQ
The text was updated successfully, but these errors were encountered: