Documentation

getOperationsForSite

Rights::getOperationsForSite(
   $siteId
)

Method returns current user access permissions. In case of non-existing site or unavailable access permissions for site, returns an empty array. Otherwise returns an array consisting of the following values:

  • denied - access denied
  • read – read access (automatically assigned by the system when additionally indicating any other access permission other than denied)
  • edit – edit access (for page content)
  • sett – setting edit access
  • public – publishing access
  • delete – deleting access (for removing to and restoring from recycle bin)

Parameters

Class Description Available from version
siteId Site ID.

Example

if (\Bitrix\Main\Loader::includeModule('landing'))
{
   $rights = \Bitrix\Landing\Rights::getOperationsForSite($siteId);
   print_r($rights);
}


© «Bitrix24», 2001-2024