You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Alfresco中为特定用户组设置多选操作的可见性

解决方案

要让最后一个下载操作仅对特定用户组可见,你可以直接在该<action>标签内添加Alfresco自带的组成员资格evaluator,无需自定义代码。具体操作如下:

修改后的完整XML配置

<config evaluator="string-compare" condition="DownloadAll">
    <multi-select>
        <action type="action-link" id="onDownloadAllDocumentAsZip" icon="document-download"
                label="action.download.all.as.zip.label" />
        <action type="action-link" id="onDownloadAllAsExcel" icon="document-download"
                label="action.download.all.as.excel.label" />
        <action type="action-link" id="onDownloadAllStudyNotificationAsExcel" icon="document-download"
                label="action.download.all.study.notification.as.excel.results.label" />
        <action type="action-link" id="onDownloadAllAsExcelIUCLID" icon="document-download"
                label="action.download.all.as.excel.iuclid.label" />
        <action type="action-link" id="onDownloadAllAsExcelUpdateMetadata" icon="document-download"
                label="action.download.all.as.excel.update.metadata.label">
            <!-- 添加组权限校验的evaluator -->
            <evaluator>group-membership</evaluator>
            <params>
                <!-- 替换为你需要授权的目标用户组,注意组名需加GROUP_前缀 -->
                <param name="group">GROUP_YourTargetGroup</param>
            </params>
        </action>
    </multi-select>
</config>

关键说明

  • <evaluator>group-membership</evaluator>:这是Alfresco内置的evaluator,用于校验当前用户是否属于指定组。
  • <param name="group">GROUP_YourTargetGroup</param>:将GROUP_YourTargetGroup替换为实际的用户组名称(比如GROUP_Admin或你自定义的组),组名必须以GROUP_开头,这是Alfresco的命名规范。
  • 只有当当前登录用户属于该指定组时,最后一个下载操作才会在多选菜单中显示;非组内用户将看不到这个选项。

内容的提问来源于stack exchange,提问作者Mike1988B

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.17 07:40:39