Documentation

GetGroupPermissions

Description and parameters

array
CIBlock::GetGroupPermissions(
 int ID
);

Returns access permissions to iblock ID for all user groups. Non-static method.

Parameters

ParameterDescription
ID Iblock ID.

Returns

Array("group ID"=>"Access permission"[, ...]). Access permission can have the following value:
"R" - read,
"U" - edit via workflow,
"W" - edit,
"X" - full access (edit + right to edit access permissions).

See Also

Example

<?
// select list of users with access permission to read the iblock $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));
?>

© «Bitrix24», 2001-2024