Package com.broadleafcommerce.auth.data
Class RoleDataInitializer
java.lang.Object
com.broadleafcommerce.auth.data.RoleDataInitializer
- All Implemented Interfaces:
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)
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionRoleDataInitializer
(com.broadleafcommerce.common.extension.TypeFactory typeFactory, RoleRepository<JpaUserRole> roleRepository, UserPermissionRepository<JpaUserPermission> userPermissionRepository, boolean shouldCreateMarketplaceRoles) RoleDataInitializer
(com.broadleafcommerce.common.extension.TypeFactory typeFactory, RoleRepository<JpaUserRole> roleRepository, UserPermissionRepository<JpaUserPermission> userPermissionRepository, boolean shouldCreateMarketplaceRoles, boolean alwaysUpdateRoles) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Creates generic account member role.protected void
protected void
protected void
protected void
protected void
Creates the role used by CSR users.protected void
Creates the role for the anonymous or authenticated customer user.protected void
protected void
protected void
protected void
protected void
protected void
protected void
createRoleIfMissing
(String id, String name, Collection<String> permissionIds) protected void
createRoleIfMissing
(String id, String name, Collection<String> permissionIds, boolean accountRole, String friendlyName, String roleDescription) void
Initialize seed data for the application.protected boolean
protected boolean
-
Constructor Details
-
RoleDataInitializer
public RoleDataInitializer(com.broadleafcommerce.common.extension.TypeFactory typeFactory, RoleRepository<JpaUserRole> roleRepository, UserPermissionRepository<JpaUserPermission> userPermissionRepository, boolean shouldCreateMarketplaceRoles) -
RoleDataInitializer
public RoleDataInitializer(com.broadleafcommerce.common.extension.TypeFactory typeFactory, RoleRepository<JpaUserRole> roleRepository, UserPermissionRepository<JpaUserPermission> userPermissionRepository, boolean shouldCreateMarketplaceRoles, boolean alwaysUpdateRoles)
-
-
Method Details
-
initialize
@Transactional public void initialize()Description copied from interface:DataInitializer
Initialize seed data for the application.- Specified by:
initialize
in interfaceDataInitializer
-
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
-
createRoleIfMissing
-
isShouldCreateMarketplaceRoles
protected boolean isShouldCreateMarketplaceRoles() -
isAlwaysUpdateRoles
protected boolean isAlwaysUpdateRoles()
-