48 if (!static::$instanceCurrentUser)
50 static::$instanceCurrentUser =
new static();
53 return static::$instanceCurrentUser;
62 public static function get(
$id)
64 if (!static::$instance || static::$instance->
getId() !=
$id)
66 static::$instance =
new static(
$id);
69 return static::$instance;
89 if ($this->isCurrent())
104 if ($this->isCurrent())
109 return in_array(1, UserTable::getUserGroupIds($this->
id));
119 return $this->
getAccess()->canViewAnything();
145 if (!$this->isModuleAccessibleOnPortal())
150 if ($this->isBroadAccess())
160 if (is_object(
$GLOBALS[
'APPLICATION']) &&
$GLOBALS[
'APPLICATION']->getGroupRight(
'sender') !==
"D")
168 private function isBroadAccess()
175 if (!Integration\Bitrix24\Service::isPortal())
180 return !Role\Manager::canUse();
183 private function isModuleAccessibleOnPortal()
185 if (!Integration\Bitrix24\Service::isCloud())
190 return Option::get(
'sender',
'~is_accessible_on_portal',
'Y') ===
'Y';
200 if (!$this->isModuleAccessibleOnPortal())
205 if ($this->isBroadAccess())
215 if (is_object(
$GLOBALS[
'APPLICATION']) &&
$GLOBALS[
'APPLICATION']->getGroupRight(
'sender') ===
"W")
230 if (!Integration\Bitrix24\Service::isPortal() && !Integration\Bitrix24\Service::isCloud())
235 return $this->
getObject()->canDoOperation(
'bitrix24_config', $this->
id);
240 if(!$this->isConfigured())
245 if(array_key_exists($this->
getId(), static::$cache))
247 return static::$cache[$this->
getId()];
250 $result = !\CExtranet::IsIntranetUser(SITE_ID, $this->
getId());
252 static::$cache[$this->
getId()] = $result;
257 private function isConfigured()
259 return Loader::includeModule(
'extranet') && $this->getExtranetSiteID();
262 private function getExtranetSiteID()
264 $extranet_site_id = \COption::GetOptionString(
"extranet",
"extranet_site");
266 ($extranet_site_id !==
'')
267 && \CSite::GetArrayByID($extranet_site_id)
270 return $extranet_site_id;
283 if (!Integration\Bitrix24\Service::isCloud())
298 if (Integration\Bitrix24\Service::isCloud())
303 return $this->
getObject()->canDoOperation(
'edit_php', $this->
id);
313 if (Integration\Bitrix24\Service::isCloud())
318 return $this->
getObject()->canDoOperation(
'lpa_template_edit', $this->
id);
333 if ($this->isCurrent())
340 $this->
object = new \CUser();
346 private function isCurrent()
static loadMessages($file)
$GLOBALS['____1444769544']