Sha256: c9dc781520a060d1591edcf2e0397cfc38fa033fd631d5d2d1ae184b797d9408
Contents?: true
Size: 1.2 KB
Versions: 8
Compression:
Stored size: 1.2 KB
Contents
# frozen_string_literal: true module Spree module PermissionSets class DefaultCustomer < PermissionSets::Base def activate! can :display, Country can :display, OptionType can :display, OptionValue can :create, Order can [:read, :update], Order do |order, token| order.user == user || (order.guest_token.present? && token == order.guest_token) end can :create, ReturnAuthorization do |return_authorization| return_authorization.order.user == user end can [:display, :update], CreditCard, user_id: user.id can :display, Product can :display, ProductProperty can :display, Property can :create, Spree.user_class can [:read, :update, :update_email], Spree.user_class, id: user.id can :display, State can :display, StockItem, stock_location: { active: true } can :display, StockLocation, active: true can :display, Taxon can :display, Taxonomy can [:save_in_address_book, :remove_from_address_book], Spree.user_class, id: user.id can [:display, :view_out_of_stock], Variant can :display, Zone end end end end
Version data entries
8 entries across 8 versions & 1 rubygems