Skip to content

Commit c256d15

Browse files
committed
Exclude default roles from custom_permissions
It makes no sense to duplicate a role that can access everything, and another that shouldn't access anything.
1 parent b74d831 commit c256d15

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/app/models/spree/permission_set.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class PermissionSet < Spree::Base
1313
scope :custom_permissions, -> {
1414
where.not(id: display_permissions)
1515
.where.not(id: management_permissions)
16+
.where.not(set: ['Spree::PermissionSets::SuperUser', 'Spree::PermissionSets::DefaultCustomer'])
1617
}
1718
end
1819
end

0 commit comments

Comments
 (0)