false, self::CONFIG_COLUMN_SCHEMA => array( 'resourceID' => 'id?', 'leaseID' => 'id?', 'message' => 'text', ), ) + parent::getConfiguration(); } public function attachResource(DrydockResource $resource = null) { $this->resource = $resource; return $this; } public function getResource() { return $this->assertAttached($this->resource); } public function attachLease(DrydockLease $lease = null) { $this->lease = $lease; return $this; } public function getLease() { return $this->assertAttached($this->lease); } /* -( PhabricatorPolicyInterface )----------------------------------------- */ public function getCapabilities() { return array( PhabricatorPolicyCapability::CAN_VIEW, ); } public function getPolicy($capability) { if ($this->getResource()) { return $this->getResource()->getPolicy($capability); } return $this->getLease()->getPolicy($capability); } public function hasAutomaticCapability($capability, PhabricatorUser $viewer) { if ($this->getResource()) { return $this->getResource()->hasAutomaticCapability($capability, $viewer); } return $this->getLease()->hasAutomaticCapability($capability, $viewer); } public function describeAutomaticCapability($capability) { return pht('Logs inherit the policy of their resources.'); } }