Sha256: ed271958a8136062a79c4fabd7abfa77e29ef6e55c765502fc989bd8258c8d78
Contents?: true
Size: 562 Bytes
Versions: 66
Compression:
Stored size: 562 Bytes
Contents
# frozen_string_literal: true Spree::Deprecation.warn "BarAbility is deprecated. Use stub_authorization! instead" # Fake ability for testing administration # @private class BarAbility include CanCan::Ability def initialize(user) user ||= Spree::User.new if user.has_spree_role? 'bar' # allow dispatch to :admin, :index, and :show on Spree::Order can [:admin, :index, :show], Spree::Order # allow dispatch to :index, :show, :create and :update shipments on the admin can [:admin, :manage], Spree::Shipment end end end
Version data entries
66 entries across 66 versions & 2 rubygems