You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A better fix would be to change the 'Allow users to use their accounts to access the UAT server' permissions flag, to 'Allow users to use their accounts to bypass basic auth' and have something like the second solution suggested.
These are two ways that developers have implemented this:
If you set the SilverStripe\Security\BasicAuth::entire_site_protected_code config flag to a different permission code, it will allow non-admin users to access the site with basic auth.
Using the CMS_ACCESS_CMSMain permission meant we had to give the CMS 'Access to Pages' privilege to our 'read-only' role, which wasn't ideal (as this allowed our read-only role to add/edit/publish pages on the site).
We changed it to use the same flag that allows users access on the UAT server ('Allow users to use their accounts to access the UAT server'):
Hi team - just giving this a bump. The old (incorrect) instructions are still on the CWP site. The second of the two solutions was the one we implemented (and which works fine), so maybe just update the docs to suggest that config?
"Enabling in production" section is outdated, and needs to be updated to reference BasicAuthMiddleware configuration instead.
https://www.cwp.govt.nz/developer-docs/en/2/how_tos/basic_auth/
The text was updated successfully, but these errors were encountered: