-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extends IndexingAdapter to save metadata for member resources #137
Extends IndexingAdapter to save metadata for member resources #137
Conversation
app/adapters/indexing_adapter.rb
Outdated
@@ -41,7 +41,23 @@ def index_persister | |||
# @note This saves into both the `persister` and `index_persister` | |||
# concurrently. | |||
def save(resource:) | |||
composite_persister.save(resource: resource) | |||
if resource.respond_to?(:member_ids) && !resource.member_ids.empty? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be part of PlumChangeSetPersister
735b333
to
f7f0a40
Compare
@@ -52,6 +52,12 @@ def with(metadata_adapter:) | |||
def before_save(change_set:) | |||
apply_remote_metadata(change_set: change_set) | |||
create_files(change_set: change_set) | |||
|
|||
members(change_set: change_set).each do |member| | |||
member.read_groups = change_set.read_groups |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably only do this if the read_groups or state have changed, otherwise, we'll be touching all the FileSets in a ScannedResource any time we make a metadata change.
f7f0a40
to
3bc83a8
Compare
3bc83a8
to
5ed12a9
Compare
…ess control permissions and state for member resources during a save Migrating the IndexingAdapter functionality for propagating visibility and state into the PlumChangeSetPersister Resolving styling issues Ensuring that visibility and state are only propagated if they are members of the ChangeSet Resolving issues for cases where ChangeSet attributes are not updated Extending the test case for when member works and file sets do not have their visibility and state update
5ed12a9
to
ff7964d
Compare
Resolves #83 by extending the IndexingAdapter to propagate permissions and state for member resources during a save