-
Notifications
You must be signed in to change notification settings - Fork 5
Add restricted note info to complex object view #439
Conversation
lib/dams/controller_helper.rb
Outdated
end | ||
end | ||
result | ||
end |
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.
Layout/TrailingWhitespace: Trailing whitespace detected.
|
||
def metadata_display?(data) | ||
result = false | ||
unless data.nil? |
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.
Style/SafeNavigation: Use safe navigation (&.) instead of checking if an object exists before calling the method.
end | ||
|
||
|
||
def metadata_display?(data) |
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.
Layout/EmptyLineBetweenDefs: Use empty lines between method definitions.
lib/dams/controller_helper.rb
Outdated
end | ||
end | ||
|
||
|
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.
Layout/EmptyLines: Extra blank line detected.
|
||
def get_attribution_note(data) | ||
result = 'Content not available. Access may granted for research purposes at the discretion of the UC San Diego Library. For more information please contact the ' | ||
unless data.nil? |
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.
Style/SafeNavigation: Use safe navigation (&.) instead of checking if an object exists before calling the method.
app/helpers/dams_objects_helper.rb
Outdated
end | ||
|
||
def get_attribution_note(data) | ||
result = 'Content not available. Access may granted for research purposes at the discretion of the UC San Diego Library. For more information please contact the ' |
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.
Metrics/LineLength: Line is too long. [166/150]
if access_group.include?('local') | ||
data.each do |datum| | ||
if datum.include?('localDisplay') || datum.include?('metadataDisplay') | ||
result = "<h3>Restricted View</h3><p>#{get_attribution_note(document['otherNote_json_tesim'])}</p>".html_safe |
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.
Rails/OutputSafety: Tagging a string as html safe may be a security risk.
Update qa config Update tests and qa deploy config Fix access control tests issue Add restricted note info to complex object view Update tests and qa deploy config Update tests Fix hound violation
8ef6346
to
92c9120
Compare
Add restricted view banner note for complex metadata-only object view.
@ucsdlib/developers - please review