Bitrix Site Manager

CFormStatus::GetPermissions

array
CFormStatus::GetPermissions(
 int status_id
)

The method GetPermissions returns an array of the current user permissions for the specified status. The following values are possible in this array:

Parameters

Parameter Description
status_id The status ID.

See Also

Example



<?
$STATUS_ID = 1;

// obtain the current user permissions for the specified status
$arPerm = CFormStatus::GetPermissions($STATUS_ID);

if (in_array("VIEW", $arPerm)) 
    echo "You can view the results in this status";

if (in_array("EDIT", $arPerm)) 
    echo "You can edit the results in this status";

if (in_array("MOVE", $arPerm)) 
    echo "You can assign this status to a result";

if (in_array("DELETE", $arPerm)) 
    echo "You can delete the results in this status";
?>