Sha256: d47e9ad492369f50e75d6cf143c79c02429d17d51308b3f454ba9a845f118da0
Contents?: true
Size: 498 Bytes
Versions: 4
Compression:
Stored size: 498 Bytes
Contents
# Fake ability for testing administration class BarAbility include CanCan::Ability def initialize(user) user ||= Spree::User.new if user.has_spree_role? 'bar' # allow dispatch to :index and :show orders on the admin can :index, Spree::Order can :show, Spree::Order can :admin, Spree::Order # allow dispatch to :index, :show, :create and :update shipments on the admin can :manage, Spree::Shipment can :admin, Spree::Shipment end end end
Version data entries
4 entries across 4 versions & 1 rubygems