Skip to content

Commit

Permalink
Fix treeview builder for sampletypes
Browse files Browse the repository at this point in the history
  • Loading branch information
kdp-cloud committed Oct 10, 2024
1 parent 840f2e6 commit a43748c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/treeview_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@ def folder_node(folder)
end

def create_node(obj)
can_view = if obj[:resource].is_a?(SampleType)
obj[:resource].can_view?(User.current_user, nil, true)
else
obj[:resource].can_view?
end
can_view = obj[:resource].can_view?
unless can_view
obj[:text] = 'hidden item'
obj[:a_attr] = { 'style': 'font-style:italic;font-weight:bold;color:#ccc' }
Expand Down

0 comments on commit a43748c

Please sign in to comment.