Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / chatlog / storage / PhabricatorChatLogChannel.php
blob2e62bcb6cf08101446e18fa05e9a5b05f82d73b5
1 <?php
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() {
14 return array(
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'),
23 'unique' => true,
26 ) + parent::getConfiguration();
29 public function getCapabilities() {
30 return array(
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;
40 break;
41 case PhabricatorPolicyCapability::CAN_EDIT:
42 return $this->editPolicy;
43 break;
47 public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {
48 return false;