Class: Spree::PermissionSets::RestrictedStockManagement

Inherits:
Base
  • Object
show all
Defined in:
lib/spree/permission_sets/restricted_stock_management.rb

Overview

Full permissions for stock management limited to allowed locations.

This permission set grants full control over all stock items a user has access to their locations. Those locations are also readable by the corresponding ability.

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Spree::PermissionSets::Base

Instance Method Details

#activate!Object



11
12
13
14
# File 'lib/spree/permission_sets/restricted_stock_management.rb', line 11

def activate!
  can :manage, Spree::StockItem, stock_location_id: location_ids
  can :read, Spree::StockLocation, id: location_ids
end