Bitrix Site Manager

CIBlock::SetPermission

CIBlock::SetPermission(
 int IBLOCK_ID,
 array arPERMISSIONS
);

Assigns the user group permissions to access an information block.

Parameters

ParameterDescription
IBLOCK_ID Information block ID.
arPERMISSIONS An array of the format Array("group id"=>"permission", ....), where the permission is:

D - deny,
R - read,
U - modify through the workflow,
W - read,
X - full access (write + the information block access permissions modification).

See Also

  • CIBlock::GetPermission()
  • CIBlock::Update()

    Example


    <?
    CIBlock::SetPermission($IBLOCK_ID, Array("2"=>"R", "3"=>"W"));
    ?>