[comment]: # translation:outdated

[comment]: # ({011dac20-f9e8f670})
# 传播

[comment]: # ({/011dac20-f9e8f670})



[comment]: # ({d92be2e3-b5ff62ed})
### 描述

`object templategroup.propagate(object parameters)`

此方法允许将权限应用到所有的模板组下的子组中.

::: noteclassic
此方法只有Super admin(超级管理员)用户可用. 可以在用户角色设置中撤销调用该方法的权限. 更多信息请查看 [User
roles](/manual/web_interface/frontend_sections/users/user_roles).
:::

[comment]: # ({/d92be2e3-b5ff62ed})



[comment]: # ({c5a32e2a-6102edd8})
### 参数

`(object)` 定义所需输出的参数.

此方法支持以下参数.

|参数|[类型](/manual/api/reference_commentary#data_types)|描述|
|--|--|------|
|groups|object/array|待下发权限的[模板组](/manual/api/reference/templategroup/object#template_group) .<br><br>这些模板组只能定义一个`groupid`属性.<br><br>[属性行为](/manual/api/reference_commentary#parameter-behavior):<br>- *必选*|
|permissions|boolean|如果需要下发权限请设置为`true`.<br><br>[属性行为](/manual/api/reference_commentary#parameter-behavior):<br>- *必选*|

[comment]: # ({/c5a32e2a-6102edd8})



[comment]: # ({9ef1e089-fac1a1ce})
### 返回值

`(object)` 返回一个对象，该对象包含`groupids`属性下已被下发权限的模板组的ID.

[comment]: # ({/9ef1e089-fac1a1ce})



[comment]: # ({b41637d2-0ed127f4})
### 示例

[comment]: # ({/b41637d2-0ed127f4})



[comment]: # ({66027f30-58284f05})
#### 将权限下发到模板组的子组.

将权限下发到模板组的子组.

[请求](/manual/api#performing-requests):

```json
{
    "jsonrpc": "2.0",
    "method": "templategroup.propagate",
    "params": {
        "groups": [
            {
                "groupid": "15"
            }
        ],
        "permissions": true
    },
    "id": 1
}
```

响应:

```json
{
    "jsonrpc": "2.0",
    "result": {
        "groupids": [
            "15",
        ]
    },
    "id": 1
}
```

[comment]: # ({/66027f30-58284f05})



[comment]: # ({00455354-de4769f6})
### 参阅

-   [templategroup.update](update)
-   [templategroup.massadd](massadd)
-   [Template](/manual/api/reference/template/object#template)

[comment]: # ({/00455354-de4769f6})



[comment]: # ({7cdbc801-870c4596})
### 来源
CTemplateGroup::propagate() in *ui/include/classes/api/services/CTemplateGroup.php*.

[comment]: # ({/7cdbc801-870c4596})
