{"record":{"id":"ce7e52545996f221","repo":"phacility/phabricator","slug":"query-does-not-match-any-objects-you-have-permissi","errorCode":null,"errorMessage":"Query does not match any objects you have permission to edit.","messagePattern":"Query does not match any objects you have permission to edit\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"warning","filePath":"src/applications/transactions/bulk/PhabricatorBulkEngine.php","lineNumber":394,"sourceCode":"              ),\n              '')))\n      ->appendChild(\n        id(new AphrontFormSubmitControl())\n          ->setValue(pht('Continue'))\n          ->addCancelButton($cancel_uri));\n  }\n\n  private function buildEditResponse() {\n    $viewer = $this->getViewer();\n    $controller = $this->getController();\n    $request = $controller->getRequest();\n\n    if (!$this->objectList) {\n      throw new Exception(pht('Query does not match any objects.'));\n    }\n\n    if (!$this->editableList) {\n      throw new Exception(\n        pht(\n          'Query does not match any objects you have permission to edit.'));\n    }\n\n    // Restrict the selection set to objects the user can actually edit.\n    $objects = array_intersect_key($this->editableList, $this->targetList);\n\n    if (!$objects) {\n      throw new Exception(\n        pht(\n          'You have not selected any objects to edit.'));\n    }\n\n    $raw_xactions = $request->getStr('xactions');\n    if ($raw_xactions) {\n      $raw_xactions = phutil_json_decode($raw_xactions);\n    } else {\n      $raw_xactions = array();","sourceCodeStart":376,"sourceCodeEnd":412,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/transactions/bulk/PhabricatorBulkEngine.php#L376-L412","documentation":"The bulk engine loads the editable subset (objects the actor may edit) separately from the matched set. If not a single matched object is editable, it refuses with this permission error rather than presenting a dead editing UI.","triggerScenarios":"Bulk-editing a query whose results are all policy-restricted against the acting user, for example a filter matching only other users' private objects.","commonSituations":"Non-admin users attempting bulk edits over broad queries; install-wide policy changes that revoked edit rights on the matched type.","solutions":["Narrow the query to objects you can edit (for example 'owned by me')","Ask an administrator to run the bulk edit or grant the edit capability","Check the edit policies of representative matched objects to understand the restriction"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Compute the editable subset up front, exactly as the bulk engine does.\n$editable = id(new PhabricatorPolicyFilter())\n  ->setViewer($viewer)\n  ->requireCapabilities(array(PhabricatorPolicyCapability::CAN_EDIT))\n  ->apply($objects);\nif (!$editable) {\n  // no matched object can be edited; narrow the query or escalate\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Narrow bulk queries to objects you own or can edit","Check edit policies on sample objects before launching large bulk edits","Escalate to an administrator when the edit is legitimate but permission-blocked"],"tags":["bulk-edit","permissions","policies"],"backgroundTag":"insufficient-permissions","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}