From 7b133b8bf2d594fe9e2ef3be88aafce5261fa6b5 Mon Sep 17 00:00:00 2001 From: Afaque Hussain Date: Thu, 14 Feb 2013 04:10:42 -0800 Subject: [PATCH] Added a new storage object Summary: Added a new storage object. Created PhabricatorChagLogChannel Test Plan: Will be specified by Evan :P Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4943 --- src/__phutil_library_map__.php | 6 ++++ .../storage/PhabricatorChatLogChannel.php | 36 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 src/applications/chatlog/storage/PhabricatorChatLogChannel.php diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 0487691c4d..9cfd660138 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -731,6 +731,7 @@ phutil_register_library_map(array( 'PhabricatorCalendarViewStatusController' => 'applications/calendar/controller/PhabricatorCalendarViewStatusController.php', 'PhabricatorCampfireProtocolAdapter' => 'infrastructure/daemon/bot/adapter/PhabricatorCampfireProtocolAdapter.php', 'PhabricatorChangesetResponse' => 'infrastructure/diff/PhabricatorChangesetResponse.php', + 'PhabricatorChatLogChannel' => 'applications/chatlog/storage/PhabricatorChatLogChannel.php', 'PhabricatorChatLogChannelListController' => 'applications/chatlog/controller/PhabricatorChatLogChannelListController.php', 'PhabricatorChatLogChannelLogController' => 'applications/chatlog/controller/PhabricatorChatLogChannelLogController.php', 'PhabricatorChatLogConstants' => 'applications/chatlog/constants/PhabricatorChatLogConstants.php', @@ -2183,6 +2184,11 @@ phutil_register_library_map(array( 'PhabricatorCalendarViewStatusController' => 'PhabricatorCalendarController', 'PhabricatorCampfireProtocolAdapter' => 'PhabricatorBaseProtocolAdapter', 'PhabricatorChangesetResponse' => 'AphrontProxyResponse', + 'PhabricatorChatLogChannel' => + array( + 0 => 'PhabricatorChatLogDAO', + 1 => 'PhabricatorPolicyInterface', + ), 'PhabricatorChatLogChannelListController' => 'PhabricatorChatLogController', 'PhabricatorChatLogChannelLogController' => 'PhabricatorChatLogController', 'PhabricatorChatLogController' => 'PhabricatorController', diff --git a/src/applications/chatlog/storage/PhabricatorChatLogChannel.php b/src/applications/chatlog/storage/PhabricatorChatLogChannel.php new file mode 100644 index 0000000000..33c6ab09fa --- /dev/null +++ b/src/applications/chatlog/storage/PhabricatorChatLogChannel.php @@ -0,0 +1,36 @@ +viewPolicy; + break; + case PhabricatorPolicyCapability::CAN_EDIT: + return $this->editPolicy; + break; + } + } + + public function hasAutomaticCapability($capability, PhabricatorUser $viewer) { + return false; + } + +} +