Bitrix Site Manager

CIBlock::GetGroupPermissions

array
CIBlock::GetGroupPermissions(
 int ID
);

Returns access permissions to the information block for all user groups.

Parameters

ParameterDescription
ID Information block ID.

Return Values

An array of the format Array("user group ID"=>"Permission"[, ...]). The permission can be one of the following: "D" - deny, "R" - read-only, "U" - edit through the workflow, "W" - write, "X" - full access (write + right to alter the permissions).

See Also

  • GetPermission

    Example


    <?
    // select a list of users who can read the block $IBLOCK_ID
    $gr_res = CIBlock::GetGroupPermissions($IBLOCK_ID);
    $res = Array(1);
    foreach($gr_res as $group_id=>$perm)
    if ($perm>"R")
        $res[] = $group_id;
    $res = CUser::GetList($by="NAME", $order="ASC", Array("GROUP_MULTI"=>$res));
    ?>