JasperReports服务器中的控制调度 [英] Control Scheduling in JasperReports Server
本文介绍了JasperReports服务器中的控制调度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想阻止普通用户安排报告。
只有管理员才有权安排报告。
是否可以使用 JasperReports服务器
?
I want to prevent normal users from scheduling a report.
Only administrator will have the right to schedule report.
Is it possible with JasperReports Server
?
推荐答案
是,有可能。
你应该编辑 jasperserver \ WEB-INF \actionModel-search.xml
文件。
您需要找到 ScheduleAction的定义
此文件中的操作并添加 ROLE_ADMINISTRATOR 角色的条件:
You need to find the definition of ScheduleAction
action in this file and add the condition for the ROLE_ADMINISTRATOR role:
<context name="resource_menu">
<simpleAction labelKey="RM_BUTTON_RUN" action="invokeRedirectAction" actionArgs="RunResourceAction"
clientTest="canBeRun" className="up"/>
<condition test="isSupportedDevice">
<simpleAction labelKey="RM_BUTTON_RUN_IN_BACKGROUND" action="invokeRedirectAction" actionArgs="RunInBackgroundResourceAction"
clientTest="canBeRunInBackground" className="up"/>
<condition test="checkAuthenticationRoles" testArgs="ROLE_ADMINISTRATOR">
<simpleAction labelKey="RM_BUTTON_SCHEDULE_REPORT" action="invokeRedirectAction" actionArgs="ScheduleAction"
clientTest="canBeScheduled" className="up"/>
</condition>
<simpleAction labelKey="RM_BUTTON_WIZARD" action="invokeRedirectAction" actionArgs="EditResourceAction"
clientTest="canResourceBeEdited" className="up"/>
</condition>
我刚添加< condition test =checkAuthenticationRolestestArgs =ROLE_ADMINISTRATOR>
用于 ScheduleAction
操作。
之后你应该重启应用程序服务器(Tomcat)。
After that you should restart the application server (Tomcat).
这篇关于JasperReports服务器中的控制调度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文