mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
requiring an email address for users is now configurable (#1914)
This commit is contained in:
@@ -331,6 +331,12 @@ public interface CommaFeedConfiguration {
|
||||
@WithDefault("4")
|
||||
int minimumPasswordLength();
|
||||
|
||||
/**
|
||||
* Whether an email address is required when creating a user account.
|
||||
*/
|
||||
@WithDefault("false")
|
||||
boolean emailAddressRequired();
|
||||
|
||||
/**
|
||||
* Whether to create a demo account the first time the app starts.
|
||||
*/
|
||||
|
||||
@@ -25,6 +25,9 @@ public class ServerInfo implements Serializable {
|
||||
@Schema(required = true)
|
||||
private boolean allowRegistrations;
|
||||
|
||||
@Schema(required = true)
|
||||
private boolean emailAddressRequired;
|
||||
|
||||
@Schema(required = true)
|
||||
private boolean smtpEnabled;
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ public class ServerREST {
|
||||
infos.setVersion(version.getVersion());
|
||||
infos.setGitCommit(version.getGitCommit());
|
||||
infos.setAllowRegistrations(config.users().allowRegistrations());
|
||||
infos.setEmailAddressRequired(config.users().emailAddressRequired());
|
||||
infos.setSmtpEnabled(config.passwordRecoveryEnabled());
|
||||
infos.setDemoAccountEnabled(config.users().createDemoAccount());
|
||||
infos.setWebsocketEnabled(config.websocket().enabled());
|
||||
|
||||
Reference in New Issue
Block a user