Class AuthenticationUiPolicyStore
java.lang.Object
io.jmix.securityflowui.impl.constraint.AuthenticationUiPolicyStore
- All Implemented Interfaces:
UiPolicyStore
@Component("sec_AuthenticationUiPolicyStore")
public class AuthenticationUiPolicyStore
extends Object
implements UiPolicyStore
-
Field Summary
Modifier and TypeFieldDescriptionprotected CurrentAuthentication
protected ResourceRoleRepository
protected RoleGrantedAuthorityUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected <T> Stream<T>
extractFromAuthenticationByScope
(Function<ResourceRole, Stream<T>> extractor) getMenuResourcePolicies
(String menuId) protected Stream<ResourcePolicy>
getPoliciesStreamByTypeAndResources
(ResourceRole resourceRole, String policyType, Collection<String> resources) protected String
getScope
(org.springframework.security.core.Authentication authentication) getViewResourcePolicies
(String viewId) protected boolean
isAppliedForScope
(ResourceRole resourceRole, String scope)
-
Field Details
-
currentAuthentication
-
resourceRoleRepository
-
roleGrantedAuthorityUtils
-
-
Constructor Details
-
AuthenticationUiPolicyStore
public AuthenticationUiPolicyStore()
-
-
Method Details
-
getViewResourcePolicies
- Specified by:
getViewResourcePolicies
in interfaceUiPolicyStore
-
getMenuResourcePolicies
- Specified by:
getMenuResourcePolicies
in interfaceUiPolicyStore
-
extractFromAuthenticationByScope
protected <T> Stream<T> extractFromAuthenticationByScope(Function<ResourceRole, Stream<T>> extractor) -
getScope
@Nullable protected String getScope(org.springframework.security.core.Authentication authentication) -
isAppliedForScope
-
getPoliciesStreamByTypeAndResources
protected Stream<ResourcePolicy> getPoliciesStreamByTypeAndResources(ResourceRole resourceRole, String policyType, Collection<String> resources)
-