changeset 37:40e282462f2e

fixed password instead of whitelist
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 08 Jul 2020 21:05:15 -0600
parents 157eac0dee34
children 04d4c291484b
files src/nabble/view/web/more/ForumStart.java src/nabble/view/web/more/ForumStart.jtp src/nabble/view/web/more/MailingListRequest.java src/nabble/view/web/more/MailingListRequest.jtp
diffstat 4 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/nabble/view/web/more/ForumStart.java	Wed Jul 08 12:22:41 2020 -0600
+++ b/src/nabble/view/web/more/ForumStart.java	Wed Jul 08 21:05:15 2020 -0600
@@ -33,7 +33,6 @@
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import org.slf4j.Logger;
@@ -185,7 +184,7 @@
 	}
 
 
-	static final Set whitelist = (Set)Init.get("whitelist");
+	private static final String newSitePassword = (String)Init.get("new_site_password");
 
 	public static class Save extends HttpServlet {
 
@@ -234,7 +233,7 @@
 			}
 
 			if (errors.isEmpty()) {
-				if( whitelist!=null && !whitelist.contains(email) ) {
+				if( newSitePassword!=null && !newSitePassword.equals(password) ) {
 					logger.info("ignoring "+email);
 					return;
 				}
--- a/src/nabble/view/web/more/ForumStart.jtp	Wed Jul 08 12:22:41 2020 -0600
+++ b/src/nabble/view/web/more/ForumStart.jtp	Wed Jul 08 21:05:15 2020 -0600
@@ -33,7 +33,6 @@
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import org.slf4j.Logger;
@@ -250,7 +249,7 @@
 	}
 
 
-	static final Set whitelist = (Set)Init.get("whitelist");
+	private static final String newSitePassword = (String)Init.get("new_site_password");
 
 	public static class Save extends HttpServlet {
 
@@ -299,7 +298,7 @@
 			}
 
 			if (errors.isEmpty()) {
-				if( whitelist!=null && !whitelist.contains(email) ) {
+				if( newSitePassword!=null && !newSitePassword.equals(password) ) {
 					logger.info("ignoring "+email);
 					return;
 				}
--- a/src/nabble/view/web/more/MailingListRequest.java	Wed Jul 08 12:22:41 2020 -0600
+++ b/src/nabble/view/web/more/MailingListRequest.java	Wed Jul 08 21:05:15 2020 -0600
@@ -13,6 +13,7 @@
 import nabble.model.Node;
 import nabble.model.Site;
 import nabble.model.User;
+import nabble.model.Init;
 import nabble.view.lib.Jtp;
 import nabble.view.lib.NewSiteMail;
 import nabble.view.lib.Permissions;
@@ -153,6 +154,8 @@
 
 	}
 
+	private static final String newSitePassword = (String)Init.get("new_site_password");
+
 	public static class Save extends HttpServlet {
 
 		private static String get(String name, HttpServletRequest request) {
@@ -204,7 +207,7 @@
 			}
 
 			if (errors.isEmpty()) {
-				if( ForumStart.whitelist!=null && !ForumStart.whitelist.contains(email) ) {
+				if( newSitePassword!=null && !newSitePassword.equals(password) ) {
 					logger.info("ignoring "+email);
 					return;
 				}
--- a/src/nabble/view/web/more/MailingListRequest.jtp	Wed Jul 08 12:22:41 2020 -0600
+++ b/src/nabble/view/web/more/MailingListRequest.jtp	Wed Jul 08 21:05:15 2020 -0600
@@ -13,6 +13,7 @@
 import nabble.model.Node;
 import nabble.model.Site;
 import nabble.model.User;
+import nabble.model.Init;
 import nabble.view.lib.Jtp;
 import nabble.view.lib.NewSiteMail;
 import nabble.view.lib.Permissions;
@@ -249,6 +250,8 @@
 		<%
 	}
 
+	private static final String newSitePassword = (String)Init.get("new_site_password");
+
 	public static class Save extends HttpServlet {
 
 		private static String get(String name, HttpServletRequest request) {
@@ -300,7 +303,7 @@
 			}
 
 			if (errors.isEmpty()) {
-				if( ForumStart.whitelist!=null && !ForumStart.whitelist.contains(email) ) {
+				if( newSitePassword!=null && !newSitePassword.equals(password) ) {
 					logger.info("ignoring "+email);
 					return;
 				}