Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/concerns/rights_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module RightsConcern
extend Geoblacklight::SolrDocument

def rights_text
"This dataset is only available to members of the <b>New York University</b> community and is limited to <em>current</em> students, staff, and faculty. Do not copy or redistribute this data. If you have questions about what constitutes fair use of this material, please contact us directly at <a href='mailto:data.services@nyu.edu'>data.services@nyu.edu</a>.<br/><br/>Please note that access while on the NYU wifi network or via <a href='https://www.nyu.edu/life/information-technology/infrastructure/network-services/vpn.html'>NYU VPN</a> is required to preview the data below; authenticated users may use the asset download features without NYU VPN." if nyu? && restricted?
"This dataset is only available to members of the <b>New York University</b> community and is limited to <em>current</em> students, staff, and faculty. Do not copy or redistribute this data. If you have questions about what constitutes fair use of this material, please contact us directly at <a href='mailto:data.services@nyu.edu'>data.services@nyu.edu</a>.<br/><br/>In order to download the data, click on the hdl.handle.net link at the bottom of the record." if nyu? && restricted?
end

def nyu?
Expand Down
6 changes: 0 additions & 6 deletions app/views/catalog/_show_downloads.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,4 @@
</div>
</div>
<% end %>
<% elsif document.restricted? && document.same_institution? %>
<div class="card authentication">
<div class="card-header">
<%= link_to t('geoblacklight.tools.login_to_view'), user_shibboleth_omniauth_authorize_path, method: :post, class: ['btn', 'btn-default'] %>
</div>
</div>
<% end %>
4 changes: 0 additions & 4 deletions app/views/shared/_user_util_links.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
<li class="nav-item">
<%= link_to current_user.to_s, bookmarks_path, class: 'nav-link' %>
</li>
<% else %>
<li class="nav-item">
<%= link_to t('blacklight.header_links.login'), user_shibboleth_omniauth_authorize_path, method: :post, class: 'nav-link' %>
</li>
<% end %>
<% end %>
</ul>
12 changes: 6 additions & 6 deletions spec/features/show_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
describe 'Show page' do
context 'with restricted NYU result - nyu-2451-34626' do
context 'when signed out' do
it 'the displays warning message' do
it 'displays warning message' do
visit solr_document_path 'nyu-2451-34626'
expect(page).to have_content 'This dataset is only available to members of the New York University community'
end

it 'displays the download message' do
visit solr_document_path 'nyu-2451-34626'
expect(page).to have_content 'In order to download the data'
end

it 'does not display download' do
visit solr_document_path 'nyu-2451-34626'
# rubocop:disable Capybara/NegationMatcherAfterVisit
expect(page).to have_no_content 'Export'
# rubocop:enable Capybara/NegationMatcherAfterVisit
end

it 'includes link to login' do
visit solr_document_path 'nyu-2451-34626'
expect(page).to have_link('Login to View and Download')
end
end

context 'when signed in' do
Expand Down
Loading