Bitrix Site Manager

CMain::RemoveFileAccessPermission

bool
CMain::RemoveFileAccessPermission(
 string path,
 mixed groups = false
)

The method RemoveFileAccessPermission deletes the access permissions of a file or folder.

Parameters

ParameterDescription
path Path to the file or folder relative to the site root. In case of multiple sites, if the root directory is different, this parameters should specify an array:
array("site ID", "Path to the file or folder relative to the site root")
groups Array of groups whose permissions are to be deleted. If false, the method deletes the access permissions of all groups.
Optional; false by default.

Return Values

Returns true on success or false otherwise.

See Also

Example



<?
// delete permissions for the file 
// /en/index.php of user groups #5 and #23
if ($APPLICATION->RemoveFileAccessPermission("/en/index.php", array(5, 23)))
    ShowNote("Access permissions modified.");
?>