Sha256: e2009b41bfbc29da717e57d560a2bdf0714899e481c2238c32cdca0c4f68e338
Contents?: true
Size: 541 Bytes
Versions: 53
Compression:
Stored size: 541 Bytes
Contents
module Avo module Concerns module ChecksShowAuthorization include Avo::Concerns::ChecksAssocAuthorization extend ActiveSupport::Concern def can_view? return false if Avo.configuration.resource_default_view.edit? return authorize_association_for(:show) if @reflection.present? # Even if there's a @reflection object present, for show we're going to fallback to the original policy. @resource.authorization.authorize_action(:show, raise_exception: false) end end end end
Version data entries
53 entries across 53 versions & 1 rubygems