Sha256: 0c511577a0b5788e2871a4bd763fde6d688692fbf979b7a81df8b55301aa46a0
Contents?: true
Size: 654 Bytes
Versions: 43
Compression:
Stored size: 654 Bytes
Contents
# frozen_string_literal: true module Spree module PermissionSets class UserManagement < PermissionSets::Base def activate! can [:admin, :display, :create, :update, :save_in_address_book, :remove_from_address_book, :addresses, :orders, :items], Spree.user_class # Note: This does not work with accessible_by. # See https://github.com/solidusio/solidus/pull/1263 can :update_email, Spree.user_class do |user| user.spree_roles.none? end cannot [:delete, :destroy], Spree.user_class can :manage, Spree::StoreCredit can :display, Spree::Role end end end end
Version data entries
43 entries across 43 versions & 2 rubygems