3 final class PhabricatorChatLogChannel
4 extends PhabricatorChatLogDAO
5 implements PhabricatorPolicyInterface
{
7 protected $serviceName;
8 protected $serviceType;
9 protected $channelName;
10 protected $viewPolicy;
11 protected $editPolicy;
13 protected function getConfiguration() {
15 self
::CONFIG_COLUMN_SCHEMA
=> array(
16 'serviceName' => 'text64',
17 'serviceType' => 'text32',
18 'channelName' => 'text64',
20 self
::CONFIG_KEY_SCHEMA
=> array(
21 'key_channel' => array(
22 'columns' => array('channelName', 'serviceType', 'serviceName'),
26 ) + parent
::getConfiguration();
29 public function getCapabilities() {
31 PhabricatorPolicyCapability
::CAN_VIEW
,
32 PhabricatorPolicyCapability
::CAN_EDIT
,
36 public function getPolicy($capability) {
37 switch ($capability) {
38 case PhabricatorPolicyCapability
::CAN_VIEW
:
39 return $this->viewPolicy
;
41 case PhabricatorPolicyCapability
::CAN_EDIT
:
42 return $this->editPolicy
;
47 public function hasAutomaticCapability($capability, PhabricatorUser
$viewer) {