-
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
Replace *_embargoed
methods with Embargo#visibility_during_embargo
#1477
Labels
Comments
no-reply
pushed a commit
that referenced
this issue
Aug 3, 2018
Adds three new visibility levels to `Etd`. These are usable when an embargo is set. First we add delegation to a settable `#visibility_translator` (defaulting to an instance of `VisibilityTranslator`). This allows the `Etd` to infer its embargoed `#visibility` level based on the existing `*_embargoed` flags. We then add logic to `VisibilityTranslator` for setting visibility to the three new levels _iff_ an embargo is set on the object. Future work will shift existing clients to using the visibility setters, instead of setting `*_embargoed` flags manually and add the new visibility levels to the embargo edit pages. We may also want to consider replacing the `*_embargoed` flags with data on the `Embargo` ActiveRecord objects. We shift expectations of some tests since `Etd#visibility_during_embargo` currently does not reflect the actual work visibility during the embargo. See: #1477. Connected to #1206.
bess
pushed a commit
that referenced
this issue
Aug 6, 2018
* Always display the title as file_set text By default, Hyrax supresses the title of files when the user does not have read permissions. Since we already expose the title by making the Etd discoverable by the public (even under embargo), we don't bother supressing it in the FileSet presenter. * Allow approvers to read and edit Etds and FileSets This ensures approvers can read (download) and edit Works and FileSets. Since there's not an explicit "approving" group that we can use to set ACLs for these works, we need to set the `can` permissions explictly. Whenever `can_review_submissions?` is `true`, we let users read and edit a work, as well as forcing `test_download` to `true`. Connected to #1206, #1216. * Use VisibilityTranslator to determine and set `Etd#visibility` Adds three new visibility levels to `Etd`. These are usable when an embargo is set. First we add delegation to a settable `#visibility_translator` (defaulting to an instance of `VisibilityTranslator`). This allows the `Etd` to infer its embargoed `#visibility` level based on the existing `*_embargoed` flags. We then add logic to `VisibilityTranslator` for setting visibility to the three new levels _iff_ an embargo is set on the object. Future work will shift existing clients to using the visibility setters, instead of setting `*_embargoed` flags manually and add the new visibility levels to the embargo edit pages. We may also want to consider replacing the `*_embargoed` flags with data on the `Embargo` ActiveRecord objects. We shift expectations of some tests since `Etd#visibility_during_embargo` currently does not reflect the actual work visibility during the embargo. See: #1477. Connected to #1206. * Fixup display of custom Etd visibilities This renames the internal visibility text for custom visibility statuses for embargoed `Etd` objects. Helper behavior is added to resolve badges and limit dropdowns on the embargo edit page to the desired options. Connected to #1208, #1209. * Add `FileSet#admin_set` method Adds easy discovery of the FileSet's owning `AdminSet` through a convinience method. This method mirrors the method for Works, so any PCDM object can report its `#admin_set`. * Set `FileSet` visibility and embargo on work embargo edit Our file set visibility behavior is somewhat different from Hyrax's default behavior. When we update work visibility or permissions, we want to ensure that the FileSets are given permissions congruent with the embargo settings. We do this by setting the FileSet visibility using `FileSetActor` directly, inline. We override the `EtdsController#after_update_response` method to avoid redirects to permission edit confirmation pages. Embargoes and visibility can be set inline, since we expect the number of `FileSet`s per work to be limited to a small handful. Closes #1209. * Refactor `FileVisibilityAttributesActor` `FileVisibilityAttributesActor` now uses the shared behavior from `FileSetVisibilityAttributeBuilder`, reducing duplicated code. * Update `README_embargoes.md` with the latest embargo information Closes #1206, #1402.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: