Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/storage/PhabricatorUser.php
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | public function canEstablishWebSessions() { | ||||
if ($this->getIsSystemAgent()) { | if ($this->getIsSystemAgent()) { | ||||
return false; | return false; | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
public function canEstablishAPISessions() { | public function canEstablishAPISessions() { | ||||
if ($this->getIsDisabled()) { | |||||
return false; | |||||
} | |||||
// Intracluster requests are permitted even if the user is logged out: | |||||
// in particular, public users are allowed to issue intracluster requests | |||||
// when browsing Diffusion. | |||||
if (PhabricatorEnv::isClusterRemoteAddress()) { | |||||
if (!$this->isLoggedIn()) { | |||||
return true; | |||||
} | |||||
} | |||||
if (!$this->isUserActivated()) { | if (!$this->isUserActivated()) { | ||||
return false; | return false; | ||||
} | } | ||||
if ($this->getIsMailingList()) { | if ($this->getIsMailingList()) { | ||||
return false; | return false; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,218 Lines • Show Last 20 Lines |