Skip to content

Commit

Permalink
fix: visible items (#1836)
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Bob authored Jul 7, 2023
1 parent a78d7d6 commit c44faf4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/avo/concerns/visible_items.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ def visible_items
end

def visible(item)
if item.is_field?
item.visible? && item.visible_on?(view)
else
item.visible?
end
return item.visible? unless item.is_field?

return false if item.respond_to?(:authorized?) && item.resource.present? && !item.authorized?

item.visible? && item.visible_on?(view)
end

def visible?
Expand Down

0 comments on commit c44faf4

Please sign in to comment.