Closed hortongn closed 7 years ago
@jcoyne Reopening because the bug still exists after your PR. Edit users are still only saved on work edit, not work create.
If I'm logged in as user2@example.com
and create a new work with user1@example.com
as an editor, after I save the work and look at edit_users in the console it only has ["user2@example.com"]
@hortongn are you using a mediated deposit workflow that has a custom action to removes all the edit users?
@jcoyne Nope. This is just with a current Sufia master test app. Haven't done anything with workflows.
@jcoyne Yep, good catch. That's the problem for sure. I can take a stab at fixing that.
Descriptive summary
This exists in 7.3.0.rc3
While creating a new work if you add another user as an editor and then save the work, the editor is not saved. Editors can be successfully added to an existing work, but not to a new work.
Steps to reproduce the behavior
When adding an editor, the different behavior between new works and existing works may be due to this: https://github.com/projecthydra/sufia/blob/master/app/actors/sufia/apply_permission_template_actor.rb#L10-L17