Skip to content
This repository was archived by the owner on Mar 24, 2020. It is now read-only.

Conversation

VivianChu
Copy link
Member

Add restricted view banner note for complex metadata-only object view.

@ucsdlib/developers - please review

end
end
result
end

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?

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)

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.

end
end


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?

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 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 '

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

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
@VivianChu VivianChu force-pushed the feature/complex_obj_metadata branch from 8ef6346 to 92c9120 Compare April 25, 2018 20:36
@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 66.274% when pulling 92c9120 on feature/complex_obj_metadata into 84da581 on develop.

@VivianChu VivianChu closed this Apr 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants