Class: Spree::PermissionSets::PromotionDisplay

Inherits:
PermissionSets::Base
  • Object
show all
Defined in:
app/models/spree/permission_sets/promotion_display.rb

Overview

Read-only permissions for promotions.

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

  • Promotions

  • Promotion rules

  • Promotion actions

  • Promotion categories

  • Promotion codes

Instance Method Summary collapse

Instance Method Details

#activate!Object



16
17
18
19
20
21
22
# File 'app/models/spree/permission_sets/promotion_display.rb', line 16

def activate!
  can [:read, :admin, :edit], Spree::Promotion
  can [:read, :admin], Spree::PromotionRule
  can [:read, :admin], Spree::PromotionAction
  can [:read, :admin], Spree::PromotionCategory
  can [:read, :admin], Spree::PromotionCode
end