dxw/2fa

See the Twilio config in the admin

mec opened this issue · 2 comments

mec commented

It would be great to see the Twilio config in the WP Admin or even add/edit it there?

We have the admin page ready to go.

For sites hosted by us, why would anybody except ops would need to see the Twilio config? Principle of least privilege: don't tell people things they don't need to know. 🙈🙉

But I can see this being useful to the "typical WP user" who may not be comfortable editing PHP config files. And maybe it would be easier locally or on staging, if you need to change it frequently.

Suggestion:

  • If any of the TWILIO_* constants are set, do not show a settings page (i.e. keep the current behaviour).
  • If none of the TWILIO_* constants are set, show a settings page where superadmins can set the options.
mec commented

Even just showing that the constants have values would have helped me to get the plugin working, we could just show the values of the constants on the admin page, the 'scope' of the admin page is in the wp network admin and so would only be seen by super admins anyway?