phacility/phabricator · warning · Exception

Query does not match any objects you have permission to edit

Error message

Query does not match any objects you have permission to edit.

What it means

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.

Source

Thrown at src/applications/transactions/bulk/PhabricatorBulkEngine.php:394

              ),
              '')))
      ->appendChild(
        id(new AphrontFormSubmitControl())
          ->setValue(pht('Continue'))
          ->addCancelButton($cancel_uri));
  }

  private function buildEditResponse() {
    $viewer = $this->getViewer();
    $controller = $this->getController();
    $request = $controller->getRequest();

    if (!$this->objectList) {
      throw new Exception(pht('Query does not match any objects.'));
    }

    if (!$this->editableList) {
      throw new Exception(
        pht(
          'Query does not match any objects you have permission to edit.'));
    }

    // Restrict the selection set to objects the user can actually edit.
    $objects = array_intersect_key($this->editableList, $this->targetList);

    if (!$objects) {
      throw new Exception(
        pht(
          'You have not selected any objects to edit.'));
    }

    $raw_xactions = $request->getStr('xactions');
    if ($raw_xactions) {
      $raw_xactions = phutil_json_decode($raw_xactions);
    } else {
      $raw_xactions = array();

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Narrow the query to objects you can edit (for example 'owned by me')
  2. Ask an administrator to run the bulk edit or grant the edit capability
  3. Check the edit policies of representative matched objects to understand the restriction
Defensive patterns

Strategy: validation

Validate before calling

// Compute the editable subset up front, exactly as the bulk engine does.
$editable = id(new PhabricatorPolicyFilter())
  ->setViewer($viewer)
  ->requireCapabilities(array(PhabricatorPolicyCapability::CAN_EDIT))
  ->apply($objects);
if (!$editable) {
  // no matched object can be edited; narrow the query or escalate
}

Prevention

When it happens

Trigger: Bulk-editing a query whose results are all policy-restricted against the acting user, for example a filter matching only other users' private objects.

Common situations: Non-admin users attempting bulk edits over broad queries; install-wide policy changes that revoked edit rights on the matched type.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/ce7e52545996f221. Report an issue: GitHub.