Sha256: 1a54053ca7ecb436eac38d84e515f6600cb32a0145a82c62c082980a263818a0
Contents?: true
Size: 405 Bytes
Versions: 48
Compression:
Stored size: 405 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 :display, Spree::StockLocation, id: location_ids end private def location_ids @ids ||= user.stock_locations.pluck(:id) end end end end
Version data entries
48 entries across 48 versions & 2 rubygems