فهرست منبع

Add option to disable email confirmation banner (#2469)

GitOrigin-RevId: ef5e08a6359346cc53dff4ce7978affb71fdb556
Miguel Serrano 6 سال پیش
والد
کامیت
1c759ad413

+ 1 - 0
services/web/app/src/infrastructure/ExpressLocals.js

@@ -361,6 +361,7 @@ module.exports = function(webRouter, privateApiRouter, publicApiRouter) {
       hasSamlFeature: Features.hasFeature('saml'),
       samlInitPath: _.get(Settings, ['saml', 'ukamf', 'initPath']),
       siteUrl: Settings.siteUrl,
+      emailConfirmationDisabled: Settings.emailConfirmationDisabled,
       recaptchaSiteKeyV3:
         Settings.recaptcha != null ? Settings.recaptcha.siteKeyV3 : undefined,
       recaptchaDisabled:

+ 2 - 0
services/web/config/settings.defaults.coffee

@@ -567,6 +567,8 @@ module.exports = settings =
 
 	validRootDocExtensions: ['tex', 'Rtex', 'ltx']
 
+	emailConfirmationDisabled: (process.env['EMAIL_CONFIRMATION_DISABLED'] == "true") or false
+
 	# allowedImageNames: [
 	# 	{imageName: 'texlive-full:2017.1', imageDesc: 'TeXLive 2017'}
 	# 	{imageName:   'wl_texlive:2018.1', imageDesc: 'Legacy OL TeXLive 2015'}

+ 3 - 0
services/web/frontend/js/main/project-list/notifications-controller.js

@@ -102,6 +102,9 @@ define(['base'], function(App) {
   ) {
     $scope.userEmails = []
     $scope.showConfirmEmail = email => {
+      if (ExposedSettings.emailConfirmationDisabled) {
+        return false
+      }
       if (!email.confirmedAt && !email.hide) {
         if (
           email.affiliation &&