-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Tom Johnson
committed
Aug 3, 2018
1 parent
ac39e3f
commit ecba0f2
Showing
5 changed files
with
234 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters