Sha256: 48f57ed87134b872be21f38d0680f8871c093adea27034a276b3ccc040e456d1

Contents?: true

Size: 666 Bytes

Versions: 5

Compression:

Stored size: 666 Bytes

Contents

module Lanes

    module API

        class DummyUser
            def can_read?(*args)
                true
            end
            def can_write?(*args)
                true
            end
            def can_delete?(*args)
                true
            end
        end

        class AuthenticationProvider
            USER = DummyUser.new

            def initialize(request)
            end

            def current_user
                USER
            end

            def wrap_reply(model, req)
                yield
            end
            def wrap_model_access(model, req, options)
                yield
            end

        end
    end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lanes-0.7.0 lib/lanes/api/null_authentication_provider.rb
lanes-0.6.1 lib/lanes/api/null_authentication_provider.rb
lanes-0.6.0 lib/lanes/api/null_authentication_provider.rb
lanes-0.5.6 lib/lanes/api/null_authentication_provider.rb
lanes-0.5.5 lib/lanes/api/null_authentication_provider.rb