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.
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:
If the fields are empty, display this warning: 'The Pressbooks SAML Plugin has not been configured yet.'
If the fields are filled out, but aren't filled out correctly, display the current message: 'The Pressbooks SAML Plugin is not configured correctly.'
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.
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.
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 athttps://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