Skip to content

Commit

Permalink
fix resource reader
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Bob committed Feb 13, 2025
1 parent 1c4b138 commit a891447
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/components/avo/fields/preview_field/index_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
class Avo::Fields::PreviewField::IndexComponent < Avo::Fields::IndexComponent
include Avo::Concerns::ChecksShowAuthorization

# Used by Avo::Concerns::ChecksShowAuthorization
attr_reader :resource

def render_preview
# Do not render the link if the user is not authorized to view the resource,
# as the link exposes the result of `record.to_param`.
Expand Down

0 comments on commit a891447

Please sign in to comment.