Module: Avo::Concerns::ChecksShowAuthorization
- Extended by:
- ActiveSupport::Concern
- Includes:
- ChecksAssocAuthorization
- Included in:
- Index::ResourceControlsComponent, Index::TableRowComponent
- Defined in:
- lib/avo/concerns/checks_show_authorization.rb
Instance Method Summary collapse
Methods included from ChecksAssocAuthorization
Instance Method Details
#can_view? ⇒ Boolean
8 9 10 11 12 13 14 15 |
# File 'lib/avo/concerns/checks_show_authorization.rb', line 8 def can_view? return false if Avo.configuration.resource_default_view.edit? return (:show) if @reflection.present? # Even if there's a @reflection object present, for show we're going to fallback to the original policy. @resource..(:show, raise_exception: false) end |