Sha256: ffac203a181dc593253846c9694447aec4f2baa57d803f902b2cf49ffd6c6a33
Contents?: true
Size: 791 Bytes
Versions: 30
Compression:
Stored size: 791 Bytes
Contents
require 'pact_broker/configuration' module PactBroker class DefaultPolicy def initialize(current_user, resource) @current_user = current_user @resource = resource end def update? true end def delete? true end def create? true end def view? true end private attr_reader :current_user, :resource class Scope def initialize(user, scope) @user = user @scope = scope end def resolve scope end private attr_reader :user, :scope end end def self.policy!(*args) PactBroker.configuration.policy_builder.call(*args) end def self.policy_scope!(*args) PactBroker.configuration.policy_scope_builder.call(*args) end end
Version data entries
30 entries across 30 versions & 1 rubygems