Sha256: 3fe5da802e055d64b3632b15532a0f9d8b78182647226188ce76bd9c650cc702
Contents?: true
Size: 487 Bytes
Versions: 52
Compression:
Stored size: 487 Bytes
Contents
module Spree module PermissionSets class RestrictedStockTransferDisplay < PermissionSets::Base def activate! can [:display, :admin], Spree::StockTransfer, source_location_id: location_ids can [:display, :admin], Spree::StockTransfer, destination_location_id: location_ids can :display, Spree::StockLocation, id: location_ids end private def location_ids @ids ||= user.stock_locations.pluck(:id) end end end end
Version data entries
52 entries across 52 versions & 1 rubygems