Class RoleDataInitializer

java.lang.Object
com.broadleafcommerce.auth.data.RoleDataInitializer
All Implemented Interfaces:
DataInitializer

public class RoleDataInitializer extends Object implements DataInitializer
The seed data roles will be defined here.

These roles are necessary for seed data we define within this service. However, the admin user service also may define some of this same data for itself and will synchronize it over to this service. To avoid creation of duplicate records, the IDs used here should be kept in sync with whatever the admin user service seed data defines.

Author:
Nick Crum (ncrum)
  • Constructor Details

  • Method Details

    • initialize

      @Transactional public void initialize()
      Description copied from interface: DataInitializer
      Initialize seed data for the application.
      Specified by:
      initialize in interface DataInitializer
    • createPartialAccessRole

      protected void createPartialAccessRole()
    • createFullAccessRole

      protected void createFullAccessRole()
    • createBaseUserRole

      protected void createBaseUserRole()
    • createApproveUserRole

      protected void createApproveUserRole()
    • createDeployUserRole

      protected void createDeployUserRole()
    • createApplicationAccessRole

      protected void createApplicationAccessRole()
    • createCSRRole

      protected void createCSRRole()
      Creates the role used by CSR users.
    • createMarketplaceOperator

      protected void createMarketplaceOperator()
    • createMarketplaceVendorAdmin

      protected void createMarketplaceVendorAdmin()
    • createMarketplaceVendorMerchandiser

      protected void createMarketplaceVendorMerchandiser()
    • createCustomerUserRole

      protected void createCustomerUserRole()
      Creates the role for the anonymous or authenticated customer user.
    • createAccountMemberRole

      protected void createAccountMemberRole()
      Creates generic account member role. This is a marker role to indicate membership in an account and should not have any permissions.
    • createAccountRoles

      protected void createAccountRoles()
    • createRoleIfMissing

      protected void createRoleIfMissing(String id, String name, Collection<String> permissionIds)
    • createRoleIfMissing

      protected void createRoleIfMissing(String id, String name, Collection<String> permissionIds, boolean accountRole, @Nullable String friendlyName, @Nullable String roleDescription)
    • isShouldCreateMarketplaceRoles

      protected boolean isShouldCreateMarketplaceRoles()
    • isAlwaysUpdateRoles

      protected boolean isAlwaysUpdateRoles()