Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Remove subtle timing error in ActorStack coercion
Prior to this commit, the order of operations was: 1. Coerce the curation_concern to a valkyrie_resource 2. Save the curation concern The subtle bug is that the curation_concern's valkyrie resource would have an out of sync access control. Why, because we're relying on logic elsewhere (e.g. Hyrax::ModelConverter) to assign the permissions. In v5.0.0 and prior we're copying the current curation concern's permissions to the valkyrie permission; this happens before we save. [See implementation][1]. However, this can create issues depending on metadata adapter configuration; in particular when we update the ACL object for a record without updating the record; something that we see happening in the Frigg and Freyja adapters, but is also not limited to those adapters. Also, consider that we likely want to remove a timing of parameters; because when reading method call, we (or at least I) mentally treat the parameters we pass as order independent. Put another way, the parameters we pass should likely not change state of each other. [1]: bcf3ab0
- Loading branch information