def ndr_can?(action, subject, *extra_args)
      return true unless respond_to?(:can?)

      unless subject.is_a?(ActiveRecord::Base)
        ActiveSupport::Deprecation.warn(<<~MSG)
          Attempting to authorise a non-resource object causes authorisation to be skipped.
          In future, this behaviour may change; please use a resource where possible.
        MSG

        return true
      end

      can?(action, subject, *extra_args)
    end
def ndr_can?(action, subject, *extra_args)
      return true unless respond_to?(:can?)

      unless subject.is_a?(ActiveRecord::Base)
        ActiveSupport::Deprecation.warn(<<~MSG)
          Attempting to authorise a non-resource object causes authorisation to be skipped.
          In future, this behaviour may change; please use a resource where possible.
        MSG

        return true
      end

      can?(action, subject, *extra_args)
    end
If an authorisation provider (i.e. CanCan) exists, use it: