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

Version Path
spree_account_recurring-2.0.0 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.3.1 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.2.1 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.3.0 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.2.0 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.1.5 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.0.7 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.1.4 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.0.6 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.0.5 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.1.3 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.1.2 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.0.4 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.0.3 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.0.2 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.1.1 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.1.0 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.0.1 app/models/spree/subscriber_ability.rb
spree_account_recurring-1.0.0 app/models/spree/subscriber_ability.rb