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

Commit

Permalink
a minor tweak for vrr_user? to be more logically
Browse files Browse the repository at this point in the history
  • Loading branch information
hweng committed Jul 3, 2019
1 parent 2b7acf0 commit 29685fe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/helpers/dams_objects_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ def doi?(data)
end

def vrr_user?
return !(current_user && current_user.work_authorizations_count > 0)
return current_user && current_user.work_authorizations_count > 0
end

#---
Expand Down
2 changes: 1 addition & 1 deletion app/views/dams_objects/_admin_download.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
%>
<% if vrr_user? %>
<% if !vrr_user? %>
<div class="etc-menu">

<%= link_to embed_glyph, "#embedLink-#{component_id}", class:etc_menu_item_class, role:'button', :data => { :toggle => 'modal' }, title:'Embed' %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/dams_objects/_data_viewer.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
%>
<% if vrr_user? %>
<% if !vrr_user? %>
<div class="form-actions dams-download-button">
<% if can?(:edit, @document) || can?(:read, @document) && can_download?(@document)%>
<a id="data-view-file" class="btn <%=btnColor%> pull-right" href="<%= viewFilePath %>"><i class="glyphicon glyphicon-eye-open icon-white"></i> View file</a>
Expand Down

0 comments on commit 29685fe

Please sign in to comment.