Sha256: f68fc47d5139bd2ea4b6da7a1b40259dd5e0f56492601003b45d1b7c48f435eb
Contents?: true
Size: 443 Bytes
Versions: 19
Compression:
Stored size: 443 Bytes
Contents
module Spree class SubscriberAbility include CanCan::Ability def initialize(user) # if user.respond_to?(:has_spree_role?) && user.has_spree_role?('subscriber') # can :create, Order # can :update, Order do |order, token| # order.user == user || order.token && token == order.token # end # else # cannot :create, Order # cannot :update, Order # end end end end
Version data entries
19 entries across 19 versions & 1 rubygems