Sha256: 59b1c19cc0b96e013f5cbe8eb39865777856be52400939e7398525f74856a063

Contents?: true

Size: 314 Bytes

Versions: 35

Compression:

Stored size: 314 Bytes

Contents

module Alchemy
  module Solidus
    module AlchemyUserExtension
      def self.included(klass)
        klass.include Spree::UserMethods
      end

      def spree_roles
        if admin?
          ::Spree::Role.where(name: 'admin')
        else
          ::Spree::Role.none
        end
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
alchemy-solidus-7.5.0 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-7.4.0 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-7.3.2 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-7.1.0 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-7.0.1 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-7.0.0 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-6.3.2 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-6.3.1 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-6.3.0 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-6.2.0 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-6.1.0 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-6.0.1 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-6.0.0 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-5.0.0 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-4.1.0 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-4.0.0 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-4.0.0.pre.b2 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-4.0.0.pre.b1 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-3.3.0 lib/alchemy/solidus/alchemy_user_extension.rb
alchemy-solidus-3.2.2 lib/alchemy/solidus/alchemy_user_extension.rb