Sha256: 4b625a3ac4adee6892fc8f7372e6a23f2bc7cecc719a63d0973d40ea2a1494b6
Contents?: true
Size: 1.47 KB
Versions: 1
Compression:
Stored size: 1.47 KB
Contents
require 'lanes/access' require_relative "model" # Access control module Lanes::Access # Roles specific to Stockor module Roles # re-open the exising Support role class Support read Skr::Invoice, Skr::Customer, Skr::Sku grant Skr::SalesOrder, Skr::TimeEntry end # Accounting role for members who deal with finance class Accounting < Lanes::Access::Role grant Skr::Customer, Skr::PaymentTerm, Skr::CustomerProject, Skr::Sku, Skr::SalesOrder, Skr::TimeEntry, Skr::GlTransaction, Skr::BankAccount, Skr::Payment lock_writes Skr::Customer, :terms lock Skr::Sku, :gl_asset_account lock Skr::Customer, :gl_receivables_account end # Purchase (PO's, Vendors) class Purchasing < Lanes::Access::Role read Skr::Customer grant Skr::Sku, Skr::SalesOrder end # Standard employee role class Workforce < Lanes::Access::Role read Skr::Customer, Skr::Sku grant Skr::SalesOrder, Skr::Invoice, Skr::TimeEntry 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.4.0 | lib/skr/access_roles.rb |