java如何隐藏特定角色的自定义工作流?
我正在使用角色和权限。我必须创建一个权限来隐藏为特定角色创建的自定义工作流。当我在xml中添加这个bean文件和向导时,我根本无法启动工作流。如果还有别的办法,请告诉我。
这是我创建的bean文件
公共列表getResources() { 这资源=新阵列列表(4)
UserTransaction tx = null;
try
{
FacesContext context = FacesContext.getCurrentInstance();
tx = Repository.getUserTransaction(context, true);
tx.begin();
for (String newItem : this.packageItemsToAdd)
{
NodeRef nodeRef = new NodeRef(newItem);
if (this.getNodeService().exists(nodeRef))
{
// create our Node representation
MapNode node = new MapNode(nodeRef, this.getNodeService(), true);
this.browseBean.setupCommonBindingProperties(node);
// add property resolvers to show path information
node.addPropertyResolver("path", this.browseBean.resolverPath);
node.addPropertyResolver("displayPath", this.browseBean.resolverDisplayPath);
this.resources.add(node);
}
else
{
if (logger.isDebugEnabled())
logger.debug("Ignoring " + nodeRef + " as it has been removed from the repository");
}
}
// commit the transaction
tx.commit();
}
catch (Throwable err)
{
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err);
this.resources = Collections.<Node>emptyList();
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
}
return this.resources;
}
这是豆子种植
受保护的void resetRichList()
{
if(this.packageItemsRichList!=null)
{
这packageItemsRichList。设置值(空);
这packageItemsRichList=null;
}
}
这是xml文件 合作者
# 1 楼答案
我可以回答,但你的问题太模糊了
如果我只看这个问题,那么它非常简单>;只需创建一个检查自定义工作流操作的评估器
查找文件web客户端配置工作流操作
更改或覆盖此代码:
更改此行:
添加到自定义Java类并检查正确的权限,或者只添加