pressbooks / pressbooks-saml-sso

SAML2 Single Sign-On integration for Pressbooks (Shibboleth, ADFS, Google Apps, Etc.)
GNU General Public License v3.0
3 stars 1 forks source link

Improve incorrect configuration messages #144

Closed tw77 closed 1 year ago

tw77 commented 1 year ago

We currently show the message 'The Pressbooks SAML Plugin is not configured correctly' when the plugin is active but not configured. This is the ideal message to show when configuration has been attempted, but with incorrect values such as an invalid URL.

Screen Shot 2022-11-01 at 11 15 08 AM

On networks where the plugin is active but the fields for configuration haven't been filled out, the message about the plugin not being configured correctly has confused some network managers, who believe that something has gone wrong when in fact the configuration hasn't been attempted yet.

Proposed solution

Use conditional logic to treat empty configuration fields differently from filled-out-but-incorrect fields:

In each case, the word configured can link to the SAML configuration page at https://NETWORKURL.wp-admin/network/admin.php?page=pb_saml_admin

We also want to move the placement of this and other alerts/warnings that appear for network managers from their current location in the top of the new network manager dashboard to a dismissable block between the stats & Configure home page blocks.

Notes

current behaviour comes from: https://github.com/pressbooks/pressbooks-saml-sso/blob/af928a3c552ea4ae7e1e7ee66affa8c55bafa606/inc/class-saml.php#L158-L179 and 'verifyPluginSetup': https://github.com/pressbooks/pressbooks-saml-sso/blob/af928a3c552ea4ae7e1e7ee66affa8c55bafa606/inc/class-saml.php#L195-L203

richard015ar commented 1 year ago

Update:

SteelWagstaff commented 1 year ago

Tested -- works as expected on dev.pressbooks.network. Ready for release.