Class: Spree::PermissionSets::OrderDisplay

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

Overview

Read permissions for orders.

This permission set allows users to view all related information about orders, also from the admin panel, including:

  • Orders

  • Payments

  • Shipments

  • Adjustments

  • Line items

  • Return authorizations

  • Customer returns

  • Order cancellations

  • Reimbursements

  • Return items

  • Refunds

However, it does not allow any modifications to be made to any of these resources.

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



25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/spree/permission_sets/order_display.rb', line 25

def activate!
  can [:read, :admin, :edit, :cart], Spree::Order
  can [:read, :admin], Spree::Payment
  can [:read, :admin], Spree::Shipment
  can [:read, :admin], Spree::Adjustment
  can [:read, :admin], Spree::LineItem
  can [:read, :admin], Spree::ReturnAuthorization
  can [:read, :admin], Spree::CustomerReturn
  can [:read, :admin], Spree::OrderCancellations
  can [:read, :admin], Spree::Reimbursement
  can [:read, :admin], Spree::ReturnItem
  can [:read, :admin], Spree::Refund
end