From 0969b0d8c87ddfec15f56691d966239cc7c14b20 Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Mon, 2 Feb 2015 14:41:50 -0800 Subject: [PATCH] Policy - add an explanation for automatic capabilities for transactions and transaction comments Summary: Ref T7094. I am not sure when this text is legitimately exposed to users - they should be getting an error about not being able to see the object before they get an error about not being able to see a given transaction... That said, I think this text is logically correct at least. Test Plan: read the text Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7094 Differential Revision: https://secure.phabricator.com/D11632 --- .../storage/PhabricatorApplicationTransaction.php | 6 ++++-- .../storage/PhabricatorApplicationTransactionComment.php | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php index 9fedbb4bea..5385499438 100644 --- a/src/applications/transactions/storage/PhabricatorApplicationTransaction.php +++ b/src/applications/transactions/storage/PhabricatorApplicationTransaction.php @@ -1140,8 +1140,10 @@ abstract class PhabricatorApplicationTransaction } public function describeAutomaticCapability($capability) { - // TODO: (T603) Exact policies are unclear here. - return null; + return pht( + 'Transactions are visible to users that can see the object which was '. + 'acted upon. Some transactions - in particular, comments - are '. + 'editable by the transaction author.'); } diff --git a/src/applications/transactions/storage/PhabricatorApplicationTransactionComment.php b/src/applications/transactions/storage/PhabricatorApplicationTransactionComment.php index f750612c24..75964b218c 100644 --- a/src/applications/transactions/storage/PhabricatorApplicationTransactionComment.php +++ b/src/applications/transactions/storage/PhabricatorApplicationTransactionComment.php @@ -143,8 +143,9 @@ abstract class PhabricatorApplicationTransactionComment } public function describeAutomaticCapability($capability) { - // TODO: (T603) Policies are murky. - return null; + return pht( + 'Comments are visible to users who can see the object which was '. + 'commented on. Comments can be edited by their authors.'); }