Skip to content
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

Merged
merged 1 commit into from
Aug 30, 2017

Conversation

jrgriffiniii
Copy link
Contributor

Resolves #83 by extending the IndexingAdapter to propagate permissions and state for member resources during a save

@@ -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?
Copy link
Contributor

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

@jrgriffiniii jrgriffiniii force-pushed the issues-83-jrgriffiniii-works-file-sets-visibility branch 2 times, most recently from 735b333 to f7f0a40 Compare August 28, 2017 18:11
@jrgriffiniii jrgriffiniii changed the title [WIP] Extends IndexingAdapter to save metadata for member resources Extends IndexingAdapter to save metadata for member resources Aug 28, 2017
@@ -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
Copy link
Member

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.

@jrgriffiniii jrgriffiniii changed the title Extends IndexingAdapter to save metadata for member resources [WIP] Extends IndexingAdapter to save metadata for member resources Aug 28, 2017
@jrgriffiniii jrgriffiniii force-pushed the issues-83-jrgriffiniii-works-file-sets-visibility branch from f7f0a40 to 3bc83a8 Compare August 28, 2017 23:54
@jrgriffiniii jrgriffiniii changed the title [WIP] Extends IndexingAdapter to save metadata for member resources Extends IndexingAdapter to save metadata for member resources Aug 29, 2017
@jrgriffiniii jrgriffiniii changed the title Extends IndexingAdapter to save metadata for member resources [WIP] Extends IndexingAdapter to save metadata for member resources Aug 29, 2017
@jrgriffiniii jrgriffiniii force-pushed the issues-83-jrgriffiniii-works-file-sets-visibility branch from 3bc83a8 to 5ed12a9 Compare August 29, 2017 20:11
…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
@jrgriffiniii jrgriffiniii force-pushed the issues-83-jrgriffiniii-works-file-sets-visibility branch from 5ed12a9 to ff7964d Compare August 29, 2017 21:26
@jrgriffiniii jrgriffiniii changed the title [WIP] Extends IndexingAdapter to save metadata for member resources Extends IndexingAdapter to save metadata for member resources Aug 29, 2017
@escowles escowles merged commit 14b6aae into master Aug 30, 2017
@escowles escowles deleted the issues-83-jrgriffiniii-works-file-sets-visibility branch August 30, 2017 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants