Path: blob/master/src/applications/chatlog/storage/PhabricatorChatLogChannel.php
12242 views
<?php12final class PhabricatorChatLogChannel3extends PhabricatorChatLogDAO4implements PhabricatorPolicyInterface {56protected $serviceName;7protected $serviceType;8protected $channelName;9protected $viewPolicy;10protected $editPolicy;1112protected function getConfiguration() {13return array(14self::CONFIG_COLUMN_SCHEMA => array(15'serviceName' => 'text64',16'serviceType' => 'text32',17'channelName' => 'text64',18),19self::CONFIG_KEY_SCHEMA => array(20'key_channel' => array(21'columns' => array('channelName', 'serviceType', 'serviceName'),22'unique' => true,23),24),25) + parent::getConfiguration();26}2728public function getCapabilities() {29return array(30PhabricatorPolicyCapability::CAN_VIEW,31PhabricatorPolicyCapability::CAN_EDIT,32);33}3435public function getPolicy($capability) {36switch ($capability) {37case PhabricatorPolicyCapability::CAN_VIEW:38return $this->viewPolicy;39break;40case PhabricatorPolicyCapability::CAN_EDIT:41return $this->editPolicy;42break;43}44}4546public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {47return false;48}4950}515253