templategroup.propagate

Description

object templategroup.propagate(object parameters)

This method allows to apply permissions to all template groups' subgroups.

This method is only available to Super admin user types. Permissions to call the method can be revoked in user role settings. See User roles for more information.

Parameters

(object) Parameters defining the desired output.

The method supports the following parameters.

Parameter Type Description
groups object/array Template groups to propagate.

The template groups must have only the groupid property defined.

Parameter behavior:
- required
permissions boolean Set true if need to propagate permissions.

Parameter behavior:
- required

Return values

(object) Returns an object containing the IDs of the propagated template groups under the groupids property.

Examples

Propagating template group permissions to its subgroups.

Propagate template group permissions to its subgroups.

Request:

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

Response:

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

See also

Source

CTemplateGroup::propagate() in ui/include/classes/api/services/CTemplateGroup.php.