Page MenuHomePhabricator

"Disable/Enable Provider" action in Auth does not entirely respect "auth.locked" setting
Open, LowPublic

Description

Setup:

  • Lock auth with bin/auth lock.
  • View a provider detail page in Auth.

Then:

Screen Shot 2019-07-18 at 9.35.33 AM.png (733×1 px, 177 KB)

The Edit Auth Provider action has some caveats around it because you currently need access to the form to view some values, but Disable Provider can be improved today. The current flow looks like:

  • Action is visually enabled.
  • Clicking the action prompts for confirmation.
  • Confirming the action hits an error.

Screen Shot 2019-07-18 at 9.35.36 AM.png (733×1 px, 194 KB)

Screen Shot 2019-07-18 at 9.35.38 AM.png (733×1 px, 202 KB)

Instead:

  • The action should setDisabled(true) and setWorkflow(true) when auth is locked, to visually disable the action and prepare for a dialog. It probably already does setWorkflow(true).
  • The endpoint should return an explanation ("auth is locked"), not a prompt, when the action is disabled.

Also, maybe we should just repeat the "this is locked, you can't edit it" message on this page?