Forgot to post this after D20394. Fixes T7667.
This solution is bad, because it relies on all edits to auth configs to go through these two controllers, but I wanted to get this up to talk about a better way to do it. I was thinking about modularizing all these transactions first, which would also improve this situation:
F6573488
Then we could do something silly like:
```lang=php
class AuthConfigTransaction {
public final validateTransactions() {
// check auth.lock-config
return $this->reallyValidateTransactions();
}
}
class AuthConfigEnableTransaction extends AuthConfigTransaction {
public final reallyValidateTransactions() {
$errors = array();
if ($specific_badness) {
$errors[] = $this->newBadnessError();
}
return $errors;
}
}
```
I'm not sure if there's a better way to hook all the `validate` calls. Maybe implement `PhabricatorAuthProviderConfigEditor->validateTransaction()`?