@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Throw a more tailored error when a `storage upgrade` patch can't access a database

Summary: Fixes T8762.

Test Plan: Ran `bin/storage upgrade --namespace ... --user limited`, saw a more specific error.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8762

Differential Revision: https://secure.phabricator.com/D15080

+13 -4
+13 -4
src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php
··· 256 256 $query = str_replace('{$'.$key.'}', $value, $query); 257 257 } 258 258 259 - queryfx( 260 - $conn, 261 - '%Q', 262 - $query); 259 + try { 260 + queryfx($conn, '%Q', $query); 261 + } catch (AphrontAccessDeniedQueryException $ex) { 262 + throw new PhutilProxyException( 263 + pht( 264 + 'Unable to access a required database or table. This almost '. 265 + 'always means that the user you are connecting with ("%s") does '. 266 + 'not have sufficient permissions granted in MySQL. You can '. 267 + 'use `bin/storage databases` to get a list of all databases '. 268 + 'permission is required on.', 269 + $this->getUser()), 270 + $ex); 271 + } 263 272 } 264 273 } 265 274