Page MenuHomePhabricator

D10012.diff
No OneTemporary

D10012.diff

Index: src/applications/maniphest/storage/ManiphestTask.php
===================================================================
--- src/applications/maniphest/storage/ManiphestTask.php
+++ src/applications/maniphest/storage/ManiphestTask.php
@@ -232,21 +232,29 @@
public function hasAutomaticCapability($capability, PhabricatorUser $user) {
+ $user_phid = $user->getPHID();
// The owner of a task can always view and edit it.
$owner_phid = $this->getOwnerPHID();
if ($owner_phid) {
- $user_phid = $user->getPHID();
if ($user_phid == $owner_phid) {
return true;
}
}
+ // The author of a task can always view and edit it.
+ $author_phid = $this->getAuthorPHID();
+ if ($author_phid) {
+ if ($user_phid == $author_phid) {
+ return true;
+ }
+ }
+
return false;
}
public function describeAutomaticCapability($capability) {
return pht(
- 'The owner of a task can always view and edit it.');
+ 'The author/owner of a task can always view and edit it.');
}

File Metadata

Mime Type
text/plain
Expires
Wed, May 8, 9:58 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6271026
Default Alt Text
D10012.diff (1 KB)

Event Timeline