Documentation

Switching Role Models

Attention! This feature is available to administrator only.

Switching between landing page roles is performed as follows:

BX24.callMethod(
   'landing.role.enable',
   {
      mode: 1// 1 – to enable role model, 0 – to disable role model (enabling the expanded role)
   },
   function(result)
   {
      if(result.error())
      {
         console.error(result.error());
      }
      else
      {
         console.info(result.data());
      }
   }
);

The following method can be used to determine which role model is presently enabled for a project:

BX24.callMethod(
   'landing.role.isEnabled',
   {
   },
   function(result)
   {
      if(result.error())
      {
         console.error(result.error());
      }
      else
      {
         if (result.data())
         {
            console.log('Role model');
         }
         else
         {
            console.log('Expanded role model');
         }
      }
   }
);


© «Bitrix24», 2001-2024
Up