do not display "Sourcegraph cannot send emails!" alerts to non-admins
Created by: slimsag
In v3.38 we introduced a banner at the top of the page that would inform site admins if email sending is not configured:
Warning: Sourcegraph cannot send emails! Configure
email.smtp
so that features such as Code Monitors, password resets, and invitations work.
This was only intended to be shown to site admins, but unfortunately was shown to all users which caused issue for some customers
The issue could be worked around by adding this to their site configuration:
"htmlHeadTop": "<script>localStorage.setItem('DismissibleAlert/alert.email-sending/dismissed', 'true')</script>",
This PR (and v3.39) will fix the issue for good.
Signed-off-by: Stephen Gutekanst [email protected]
Test plan
Manually tested, plus super obvious / simple change.