Sha256: 59d313b4d3c2e36604469d6f113e44d6efe6da71cb64765d6d7d99d67875a865

Contents?: true

Size: 867 Bytes

Versions: 1

Compression:

Stored size: 867 Bytes

Contents

require 'lanes/access'
require_relative "model"

module Lanes::Access
    module Roles


        # re-open the exising Support role
        class Support
            grant Skr::Customer,
                  Skr::Sku,
                  Skr::SalesOrder

        end


        class Accounting < Lanes::Access::Role
            grant Skr::Customer,
                  Skr::PaymentTerm,
                  Skr::Sku,
                  Skr::SalesOrder
            lock_writes Skr::Customer, :terms
            lock Skr::Sku, :gl_asset_account
            lock Skr::Customer, :gl_receivables_account
        end


        class Purchasing < Lanes::Access::Role
            read Skr::Customer
            grant Skr::Sku,
                  Skr::SalesOrder
        end

    end

    Role.grant_global_access(Skr::Address)
    Role.grant_global_access(:read, Skr::PaymentTerm)

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stockor-0.1.9 lib/skr/access_roles.rb