Page MenuHomePhabricator

D19225.diff
No OneTemporary

D19225.diff

diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php
--- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php
+++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php
@@ -284,9 +284,6 @@
$edit_config = $edit_engine->loadDefaultEditConfiguration($task);
$can_create = (bool)$edit_config;
- $can_reassign = $edit_engine->hasEditAccessToTransaction(
- ManiphestTaskOwnerTransaction::TRANSACTIONTYPE);
-
if ($can_create) {
$form_key = $edit_config->getIdentifier();
$edit_uri = id(new PhutilURI("/task/edit/form/{$form_key}/"))
diff --git a/src/applications/transactions/editengine/PhabricatorEditEngine.php b/src/applications/transactions/editengine/PhabricatorEditEngine.php
--- a/src/applications/transactions/editengine/PhabricatorEditEngine.php
+++ b/src/applications/transactions/editengine/PhabricatorEditEngine.php
@@ -1398,59 +1398,6 @@
}
- /**
- * Test if the viewer could apply a certain type of change by using the
- * normal "Edit" form.
- *
- * This method returns `true` if the user has access to an edit form and
- * that edit form has a field which applied the specified transaction type,
- * and that field is visible and editable for the user.
- *
- * For example, you can use it to test if a user is able to reassign tasks
- * or not, prior to rendering dedicated UI for task reassignment.
- *
- * Note that this method does NOT test if the user can actually edit the
- * current object, just if they have access to the related field.
- *
- * @param const Transaction type to test for.
- * @return bool True if the user could "Edit" to apply the transaction type.
- */
- final public function hasEditAccessToTransaction($xaction_type) {
- $viewer = $this->getViewer();
-
- $object = $this->getTargetObject();
- if (!$object) {
- $object = $this->newEditableObject();
- }
-
- $config = $this->loadDefaultEditConfiguration($object);
- if (!$config) {
- return false;
- }
-
- $fields = $this->buildEditFields($object);
-
- $field = null;
- foreach ($fields as $form_field) {
- $field_xaction_type = $form_field->getTransactionType();
- if ($field_xaction_type === $xaction_type) {
- $field = $form_field;
- break;
- }
- }
-
- if (!$field) {
- return false;
- }
-
- if (!$field->shouldReadValueFromSubmit()) {
- return false;
- }
-
- return true;
- }
-
-
public function newNUXButton($text) {
$specs = $this->newCreateActionSpecifications(array());
$head = head($specs);

File Metadata

Mime Type
text/plain
Expires
Sat, Jun 8, 6:56 AM (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6273026
Default Alt Text
D19225.diff (2 KB)

Event Timeline