Package io.jmix.reports
Class ReportSecurityManager
java.lang.Object
io.jmix.reports.ReportSecurityManager
-
Field Summary
Modifier and TypeFieldDescriptionprotected DataManager
protected FetchPlans
protected Metadata
protected QueryTransformerFactory
protected ResourceRoleRepository
protected RoleAssignmentRepository
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyPoliciesByEntityParameters
(LoadContext lc, MetaClass inputValueMetaClass) Apply constraints for query to select reports which have input parameter with class matching inputValueMetaClassvoid
applySecurityPolicies
(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 String
wrapCodeParameterForSearch
(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
-