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 Sep 12, 2023
1 parent cc9eb18 commit f4e0fd2
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 f4e0fd2

Please sign in to comment.