Summary: 'cuz the method would fail without authentication! see D1604 for some
discussion on approaches here
Test Plan: ran arc patch and it worked
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, epriestley, johnduhart
Maniphest Tasks: T856
Differential Revision: https://secure.phabricator.com/D1645
* @task conduit
*/
final public function setConduitCredentials(array $credentials) {
- if ($this->conduitAuthenticated) {
+ if ($this->isConduitAuthenticated()) {
throw new Exception(
"You may not set new credentials after authenticating conduit.");
}
* @task conduit
*/
final public function authenticateConduit() {
- if ($this->conduitAuthenticated) {
+ if ($this->isConduitAuthenticated()) {
return $this;
}
return $this;
}
+ /**
+ * @return bool True if conduit is authenticated, false otherwise.
+ * @task conduit
+ */
+ final protected function isConduitAuthenticated() {
+ return (bool) $this->conduitAuthenticated;
+ }
+
/**
* Override this to return true if your workflow requires a conduit channel.
}
private function loadRevisionFromHash($hash) {
+ // TODO -- de-hack this as permissions become more clear with things
+ // like T848 (add scope to OAuth)
+ if (!$this->isConduitAuthenticated()) {
+ return null;
+ }
+
$conduit = $this->getConduit();
$revisions = $conduit->callMethodSynchronous(