Skip to content

Commit

Permalink
Assign roles from database on app configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
the-krg committed Aug 31, 2023
1 parent c142760 commit fd82a50
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/lib/spree/app_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,10 @@ def roles
@roles ||= Spree::RoleConfiguration.new.tap do |roles|
roles.assign_permissions :default, ['Spree::PermissionSets::DefaultCustomer']
roles.assign_permissions :admin, ['Spree::PermissionSets::SuperUser']

Spree::Role.non_base_roles.each do |role|
roles.assign_permissions role.name, role.permission_sets_constantized
end
end
end

Expand Down

0 comments on commit fd82a50

Please sign in to comment.