Package io.jmix.reports.impl.repository
Class ReportSecurityManager
java.lang.Object
io.jmix.reports.impl.repository.ReportSecurityManager
Implementation detail. Use
ReportRepository instead.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DataManagerprotected FetchPlanRepositoryprotected Metadataprotected QueryTransformerFactoryprotected ResourceRoleRepositoryprotected RoleAssignmentRepository -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyOutputType(LoadContext<Report> lc, ReportOutputType outputType) Apply condition to the query: report must have at least one template with given output type.protected voidapplyPoliciesByEntityParameters(LoadContext<Report> lc, MetaClass inputValueMetaClass) Apply constraints for query to select reports which have input parameter with class matching inputValueMetaClassvoidapplySecurityPolicies(LoadContext<Report> lc, String screen, org.springframework.security.core.userdetails.UserDetails userDetails) Apply security constraints for query to select reports available by roles and screen restrictionsgetAvailableReports(String screenId, org.springframework.security.core.userdetails.UserDetails user, MetaClass inputValueMetaClass, Boolean system, ReportOutputType outputType, Sort sort) Returns a sorted list of reports, available for certain screen, user and input parameterprotected StringwrapCodeParameterForSearch(String value)
-
Field Details
-
queryTransformerFactory
-
resourceRoleRepository
-
roleAssignmentRepository
-
fetchPlanRepository
-
metadata
-
dataManager
-
-
Constructor Details
-
ReportSecurityManager
public ReportSecurityManager()
-
-
Method Details
-
applySecurityPolicies
public void applySecurityPolicies(LoadContext<Report> lc, @Nullable String screen, @Nullable org.springframework.security.core.userdetails.UserDetails userDetails) Apply security constraints for query to select reports available by roles and screen restrictions- Parameters:
lc- load contextscreen- screen iduserDetails- user details
-
applyPoliciesByEntityParameters
protected void applyPoliciesByEntityParameters(LoadContext<Report> lc, @Nullable MetaClass inputValueMetaClass) Apply constraints for query to select reports which have input parameter with class matching inputValueMetaClass- Parameters:
lc- load contextinputValueMetaClass- meta class of input parameter value
-
applyOutputType
Apply condition to the query: report must have at least one template with given output type. -
getAvailableReports
public List<Report> getAvailableReports(@Nullable String screenId, @Nullable org.springframework.security.core.userdetails.UserDetails user, @Nullable MetaClass inputValueMetaClass, @Nullable Boolean system, @Nullable ReportOutputType outputType, @Nullable Sort sort) Returns a sorted list of reports, available for certain screen, user and input parameter- Parameters:
screenId- - id of the screenuser- - caller userinputValueMetaClass- - meta class of report input parametersort- - sorting type for the reports listsystem- - system flag- Returns:
- list of available reports
-
wrapCodeParameterForSearch
-