Sugarcrm支持产品指南糖开发人员糖开发人员指南10.0建筑学延期fileaccesscontrolmap.
此页面指的是仅在以后兼容模式下运行的模块中可用的内容。

fileaccesscontrolmap.

概述

The fileaccesscontrolmap. extension restricts specific view actions from users of the system.

笔记:这仅适用于以后兼容模式运行的模块。

特性

可用以下扩展属性。有关更多信息,请参阅 延期财产 documentation.

财产 价值
扩展范围 模块
糖变量 $ file_access_control_map.
扩展目录 ./custom/extension/modules/<module>/ ext / fileaccesscontrolmap /
编译扩展文件 ./custom/modules/<module>/ bext/fileaccesscontrolmap/file_access_control_map.ext.php.
清单installdef. $ InstallDefs ['file_access']

执行

以下部分说明了为糖实例实现自定义的各种方式。

文件系统

When working directly with the filesystem, you can create a file in ./custom/extension/modules/<module>/ ext / fileaccesscontrolmap / to restrict a view of a module. The following example will create a new restriction for the detail view:

./custom/extension/modules/<module>/ ext / fileaccesscontrolmap /<file>.php

<?php

$ file_access_control_map.['modules']['<lowercase module>']['actions'] = array(
    'detailview',
);

导航到管理员> Repair >快速修复和重建。然后系统将重建扩展并编译您的自定义 ./custom/modules/<module>/ bext/fileaccesscontrolmap/file_access_control_map.ext.php.

模块可加载包装

When building a module loadable package, you can use the $ InstallDefs ['file_access'] index to install the extension file.

installdef属性

名称 类型 描述
细绳 要安装的文件的基本路径
to_module. 细绳 要安装文件的模块的键

The example below demonstrates the proper install definition that should be used in the ./manifest.php. file, in order to add the File Access Control Map file to a specific module. You should note that when using this approach, Sugar will automatically execute Rebuild Extensions to reflect the new Action in the system.

./manifest.php.

<?php

$manifest = array(
    ...
);

$installdefs = array(
    'id' => 'ActionRemap_Example',
    'file_access' => array(
        array(
            'from' => '<basepath>/Files/custom/Extension/modules/<module>/ ext / fileaccesscontrolmap /<file>.php',
            'to_module' => '<module>',
        )
    )
);

Alternatively, you may use the $installdefs['copy'] index for the File Access Control Map Extension file. When using this approach, you may need to manually run repair actions such as a Quick Repair and Rebuild. For more information on the $installdefs['copy'] index and module-loadable packages, please refer to the 介绍清单 page.

最后修改:2020-03-16 17:00:15