Skip to content

Commit

Permalink
Fix UserManagement permissions issue.
Browse files Browse the repository at this point in the history
solidusio@01a8872
introduced a bug whereby admins with the UserManagement permission (but
no SuperUser permission) lost the ability to view the orders, addresses,
and items tabs in user admin. This code puts back that ability.
  • Loading branch information
Andrew Thal authored and jhawthorn committed Nov 2, 2015
1 parent 84a9be7 commit f13ef2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/lib/spree/permission_sets/user_management.rb
Expand Up @@ -2,7 +2,7 @@ module Spree
module PermissionSets
class UserManagement < PermissionSets::Base
def activate!
can [:admin, :display, :create, :update, :save_in_address_book, :remove_from_address_book], Spree.user_class
can [:admin, :display, :create, :update, :save_in_address_book, :remove_from_address_book, :addresses, :orders, :items], Spree.user_class

# due to how cancancan filters by associations,
# we have to define this twice, once for `accessible_by`
Expand Down

0 comments on commit f13ef2e

Please sign in to comment.