Class: Spree::PermissionSets::OrderManagement

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

Overview

Full permissions for order management.

This permission set grants full control over all order and related resources, including:

  • Orders

  • Payments

  • Shipments

  • Adjustments

  • Line items

  • Return authorizations

  • Customer returns

  • Order cancellations

  • Reimbursements

  • Return items

  • Refunds

It also allows reading reimbursement types, but not modifying them.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

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

Class Method Details

.categoryObject



29
30
31
# File 'lib/spree/permission_sets/order_management.rb', line 29

def category
  :order
end

.privilegeObject



25
26
27
# File 'lib/spree/permission_sets/order_management.rb', line 25

def privilege
  :management
end

Instance Method Details

#activate!Object



34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/spree/permission_sets/order_management.rb', line 34

def activate!
  can :read, Spree::ReimbursementType
  can :manage, Spree::Order
  can :manage, Spree::Payment
  can :manage, Spree::Shipment
  can :manage, Spree::Adjustment
  can :manage, Spree::LineItem
  can :manage, Spree::ReturnAuthorization
  can :manage, Spree::CustomerReturn
  can :manage, Spree::OrderCancellations
  can :manage, Spree::Reimbursement
  can :manage, Spree::ReturnItem
  can :manage, Spree::Refund
end