# File lib/declarative_authorization/in_model.rb, line 150
        def self.using_access_control (options = {})
          options = {
            :context => nil,
            :include_read => false
          }.merge(options)

          class_eval do
            [:create, :update, [:destroy, :delete]].each do |action, privilege|
              send("before_#{action}""before_#{action}") do |object|
                Authorization::Engine.instance.permit!(privilege || action,
                  :object => object, :context => options[:context])
              end
            end
            
            if options[:include_read]
              # after_find is only called if after_find is implemented
              after_find do |object|
                Authorization::Engine.instance.permit!(:read, :object => object,
                  :context => options[:context])
              end

              if Rails.version < "3"
                def after_find; end
              end
            end

            def self.using_access_control?
              true
            end
          end
        end