Sha256: b46aee1ba82c1ab5ccb867a48afa0e6984aa09f353a8e85490829c24792e4e62

Contents?: true

Size: 937 Bytes

Versions: 16

Compression:

Stored size: 937 Bytes

Contents

# frozen_string_literal: true

module Spree
  module PermissionSets
    # Read-only permissions for products.
    #
    # This permission set allows users to view all related information about
    # products, also from the admin panel, including:
    #
    # - Products
    # - Images
    # - Variants
    # - Option values
    # - Product properties
    # - Option types
    # - Properties
    # - Taxonomies
    # - Taxons
    class ProductDisplay < PermissionSets::Base
      def activate!
        can [:read, :admin, :edit], Spree::Product
        can [:read, :admin], Spree::Image
        can [:read, :admin], Spree::Variant
        can [:read, :admin], Spree::OptionValue
        can [:read, :admin], Spree::ProductProperty
        can [:read, :admin], Spree::OptionType
        can [:read, :admin], Spree::Property
        can [:read, :admin], Spree::Taxonomy
        can [:read, :admin], Spree::Taxon
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
solidus_core-4.3.4 lib/spree/permission_sets/product_display.rb
solidus_core-4.2.4 lib/spree/permission_sets/product_display.rb
solidus_core-4.1.5 lib/spree/permission_sets/product_display.rb
solidus_core-4.3.3 lib/spree/permission_sets/product_display.rb
solidus_core-4.3.2 lib/spree/permission_sets/product_display.rb
solidus_core-4.1.4 lib/spree/permission_sets/product_display.rb
solidus_core-4.3.1 lib/spree/permission_sets/product_display.rb
solidus_core-4.3.0 lib/spree/permission_sets/product_display.rb
solidus_core-4.2.3 lib/spree/permission_sets/product_display.rb
solidus_core-4.1.3 lib/spree/permission_sets/product_display.rb
solidus_core-4.1.2 lib/spree/permission_sets/product_display.rb
solidus_core-4.2.2 lib/spree/permission_sets/product_display.rb
solidus_core-4.2.1 lib/spree/permission_sets/product_display.rb
solidus_core-4.2.0 lib/spree/permission_sets/product_display.rb
solidus_core-4.1.1 lib/spree/permission_sets/product_display.rb
solidus_core-4.1.0 lib/spree/permission_sets/product_display.rb