Class: Spree::PermissionSets::ConfigurationManagement

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

Overview

Read and write permissions for e-commerce settings.

Roles with this permission set will have full control over:

  • Tax categories

  • Tax rates

  • Zones

  • Countries

  • States

  • Payment methods

  • Taxonomies

  • Shipping methods

  • Shipping categories

  • Stock locations

  • Stock movements

  • Refund reasons

  • Reimbursement types

  • Return reasons

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/configuration_management.rb', line 29

def category
  :configuration
end

.privilegeObject



25
26
27
# File 'lib/spree/permission_sets/configuration_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
48
49
# File 'lib/spree/permission_sets/configuration_management.rb', line 34

def activate!
  can :manage, Spree::TaxCategory
  can :manage, Spree::TaxRate
  can :manage, Spree::Zone
  can :manage, Spree::Country
  can :manage, Spree::State
  can :manage, Spree::PaymentMethod
  can :manage, Spree::Taxonomy
  can :manage, Spree::ShippingMethod
  can :manage, Spree::ShippingCategory
  can :manage, Spree::StockLocation
  can :manage, Spree::StockMovement
  can :manage, Spree::RefundReason
  can :manage, Spree::ReimbursementType
  can :manage, Spree::ReturnReason
end