Sha256: caf437d457779530ad5237ac86e7c2019c0373c13306e952a8ba4ec3f876f2fc
Contents?: true
Size: 402 Bytes
Versions: 66
Compression:
Stored size: 402 Bytes
Contents
# frozen_string_literal: true module Spree module PermissionSets class RestrictedStockManagement < PermissionSets::Base def activate! can :manage, Spree::StockItem, stock_location_id: location_ids can :read, Spree::StockLocation, id: location_ids end private def location_ids @ids ||= user.stock_locations.pluck(:id) end end end end
Version data entries
66 entries across 66 versions & 1 rubygems