Package io.jmix.reports
Class ReportSecurityManager
java.lang.Object
io.jmix.reports.ReportSecurityManager
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DataManagerprotected FetchPlansprotected Metadataprotected QueryTransformerFactoryprotected ResourceRoleRepositoryprotected RoleAssignmentRepository - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidapplyPoliciesByEntityParameters(LoadContext lc, MetaClass inputValueMetaClass) Apply constraints for query to select reports which have input parameter with class matching inputValueMetaClassvoidapplySecurityPolicies(LoadContext 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) Returns a list of reports, available for certain screen, user and input parameterprotected StringwrapCodeParameterForSearch(String value)  
- 
Field Details
- 
queryTransformerFactory
 - 
resourceRoleRepository
 - 
roleAssignmentRepository
 - 
fetchPlans
 - 
metadata
 - 
dataManager
 
 - 
 - 
Constructor Details
- 
ReportSecurityManager
public ReportSecurityManager() 
 - 
 - 
Method Details
- 
applySecurityPolicies
public void applySecurityPolicies(LoadContext 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
public void applyPoliciesByEntityParameters(LoadContext 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
 - 
getAvailableReports
public List<Report> getAvailableReports(@Nullable String screenId, @Nullable org.springframework.security.core.userdetails.UserDetails user, @Nullable MetaClass inputValueMetaClass) Returns a list of reports, available for certain screen, user and input parameter- Parameters:
 screenId- - id of the screenuser- - caller userinputValueMetaClass- - meta class of report input parameter- Returns:
 - list of available reports
 
 - 
wrapCodeParameterForSearch
 
 -