Automattic / jetpack-force-2fa

6 stars 1 forks source link

Match By Email should be disabled #19

Open joshbetz opened 7 years ago

joshbetz commented 7 years ago

Since we hardcode the set by email option, the checkbox should be disabled. After checking in wp-cli, Jetpack_SSO_Helpers::is_match_by_email_checkbox_disabled() returns the correct value. It seems like render_match_by_email() is not firing, but I'm not sure where that field is coming from then.

https://github.com/Automattic/jetpack/blob/5c4fd63e63cdcb380a16d33a591a265ca6b4318e/modules/sso.php#L291

kraftbj commented 7 years ago

I'm not that familiar with the new Jetpack UI and how all the JS plugs in together. The render_match_by_email is traditional settings UI.

https://github.com/Automattic/jetpack/blob/3864546692d44dd4791fa54a867372151f56a5c5/_inc/client/components/module-settings/index.jsx#L350

I presume you mean the setting via Jetpack->Settings in the new UI under SIngle Sign-On?

joshbetz commented 7 years ago

I presume you mean the setting via Jetpack->Settings in the new UI under SIngle Sign-On?

Yes

ebinnion commented 7 years ago

In this case, it looks like the new UI doesn't have support for the SSO options being disabled. We'll need to add Jetpack_SSO_Helpers::is_match_by_email_checkbox_disabled() to UI's state.

kraftbj commented 7 years ago

Opened https://github.com/Automattic/jetpack/issues/6136 to track getting these added.