Package io.jmix.security.role
Class RoleGrantedAuthorityUtils
java.lang.Object
io.jmix.security.role.RoleGrantedAuthorityUtils
Utility class for working with Jmix-related
GrantedAuthority. Use this class when you need to
programmatically create an instance of the granted authority for resource or row-level role.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.GrantedAuthoritycreateResourceRoleGrantedAuthority(ResourceRole resourceRole) CreatesGrantedAuthorityfor the givenResourceRoleorg.springframework.security.core.GrantedAuthoritycreateResourceRoleGrantedAuthority(String resourceRoleCode) CreatesGrantedAuthorityfor theResourceRolewith the given codeorg.springframework.security.core.GrantedAuthoritycreateRowLevelRoleGrantedAuthority(RowLevelRole rowLevelRole) CreatesGrantedAuthorityfor the givenRowLevelRoleorg.springframework.security.core.GrantedAuthoritycreateRowLevelRoleGrantedAuthority(String rowLevelRoleCode) CreatesGrantedAuthorityfor theRowLevelRolewith the given codeReturns the role prefix for the resource role.Returns the role prefix for the row-level role (ROW_LEVEL_ROLE_ by default)voidinit()voidsetGrantedAuthorityDefaults(org.springframework.security.config.core.GrantedAuthorityDefaults grantedAuthorityDefaults)
-
Constructor Details
-
RoleGrantedAuthorityUtils
-
-
Method Details
-
setGrantedAuthorityDefaults
@Autowired(required=false) public void setGrantedAuthorityDefaults(org.springframework.security.config.core.GrantedAuthorityDefaults grantedAuthorityDefaults) -
init
@PostConstruct public void init() -
createResourceRoleGrantedAuthority
public org.springframework.security.core.GrantedAuthority createResourceRoleGrantedAuthority(ResourceRole resourceRole) CreatesGrantedAuthorityfor the givenResourceRole -
createResourceRoleGrantedAuthority
public org.springframework.security.core.GrantedAuthority createResourceRoleGrantedAuthority(String resourceRoleCode) CreatesGrantedAuthorityfor theResourceRolewith the given code -
createRowLevelRoleGrantedAuthority
public org.springframework.security.core.GrantedAuthority createRowLevelRoleGrantedAuthority(RowLevelRole rowLevelRole) CreatesGrantedAuthorityfor the givenRowLevelRole -
createRowLevelRoleGrantedAuthority
public org.springframework.security.core.GrantedAuthority createRowLevelRoleGrantedAuthority(String rowLevelRoleCode) CreatesGrantedAuthorityfor theRowLevelRolewith the given code -
getDefaultRolePrefix
Returns the role prefix for the resource role. It is taken from theGrantedAuthorityDefaultsif the bean of this type is defined. Otherwise, the default ROLE_ value is returned. -
getDefaultRowLevelRolePrefix
Returns the role prefix for the row-level role (ROW_LEVEL_ROLE_ by default)
-