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

Remove depositors access to FileSets in mediated deposit #1207

Merged
merged 1 commit into from
Jun 16, 2017

Conversation

jcoyne
Copy link
Member

@jcoyne jcoyne commented Jun 13, 2017

Fixes #1091

@samvera/hyrax-code-reviewers

Copy link
Member

@mjgiarlo mjgiarlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a question about child works.

def perform(work, user_key)
# Iterate over ids because reifying objects is slow.
work.member_ids.each do |file_set_id|
RevokeEditJob.perform_now(file_set_id, user_key)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this also act on child works? If so, file_set_id may cause confusion in the future.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the method in RevokeEditJob is always called with perform_now and only ever called here, then move that perform method into a private method on this job and dispense with the extra job.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@darrenleeweber If we do that, that means a single failure in updating one of the members would halt the whole batch. This way, the failure is isolated and can be restarted independently.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjgiarlo I'm not sure what we should do about child works. Should I explicitly include them or exclude them?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jcoyne - so your saying the whole thing does not need to be an atomic "transaction"? It's OK if any one of the users is not removed? As it is, I guess this parent job will never fail.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@darrenleeweber There is no way in ActiveFedora to use a transaction (mostly because there is no support for transactions in Solr).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jcoyne I suspect that excluding them until we have to analyze the effects and side-effects of that change can be explored. Write up a new issue and focus on FSes here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'll make some changes. Here's the ticket for child works: #1213


# @param [String] file_set_id - the identifier of the object to revoke access from
# @param [String] user_key - the user to remove
def perform(file_set_id, user_key)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above.

@jcoyne jcoyne force-pushed the erase_file_set_access branch 2 times, most recently from ad31e03 to 8341adc Compare June 14, 2017 20:16
@jeremyf jeremyf merged commit 1e446ce into master Jun 16, 2017
@jeremyf jeremyf deleted the erase_file_set_access branch June 16, 2017 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants