From 25e6dd94919d0a08355cc85aed25f9adda076ce3 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 31 Aug 2010 15:56:21 -0400 Subject: [PATCH] Added a global config setting to allow anonymous guest logins. This does not change any of the behavior of the system yet. --- citadel/control.c | 8 ++++++++ citadel/include/dtds/config-defs.h | 7 ++++--- citadel/textclient/tuiconfig.c | 5 ++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/citadel/control.c b/citadel/control.c index 0bf7c13d3..7048ab702 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -310,6 +310,10 @@ long get_new_room_number(void) /* * Get or set global configuration options + * + * IF YOU ADD OR CHANGE FIELDS HERE, YOU *MUST* DOCUMENT YOUR CHANGES AT: + * http://www.citadel.org/doku.php/documentation:appproto:system_config + * */ void cmd_conf(char *argbuf) { @@ -399,6 +403,7 @@ void cmd_conf(char *argbuf) cprintf("%ld\n", config.c_pop3_fetch); cprintf("%ld\n", config.c_pop3_fastest); cprintf("%d\n", config.c_spam_flag_only); + cprintf("%d\n", config.c_guest_logins); cprintf("000\n"); } @@ -655,6 +660,9 @@ void cmd_conf(char *argbuf) case 66: config.c_spam_flag_only = atoi(buf); break; + case 67: + config.c_guest_logins = atoi(buf); + break; } ++a; } diff --git a/citadel/include/dtds/config-defs.h b/citadel/include/dtds/config-defs.h index d14b3b4f4..cb082da33 100644 --- a/citadel/include/dtds/config-defs.h +++ b/citadel/include/dtds/config-defs.h @@ -86,6 +86,7 @@ CFG_VALUE(STRING_BUF(c_pager_program, 256), " External pager program (blank to CFG_VALUE(CHAR(c_imap_keep_from), " IMAP keep original from header in msgs"); CFG_VALUE(INTEGER(c_xmpp_c2s_port), " XMPP client-to-server port (usually 5222)"); CFG_VALUE(INTEGER(c_xmpp_s2s_port), " XMPP server-to-server port (usually 5269)"); -CFG_VALUE(TIME(c_pop3_fetch), " How often to fetch POP3 messages"); -CFG_VALUE(TIME(c_pop3_fastest), " Users can specify POP3 fetching this often"); -CFG_VALUE(INTEGER(c_spam_flag_only), " 1 = flag instead of reject spam"); +CFG_VALUE(TIME(c_pop3_fetch), " How often to fetch POP3 messages"); +CFG_VALUE(TIME(c_pop3_fastest), " Users can specify POP3 fetching this often"); +CFG_VALUE(INTEGER(c_spam_flag_only), " 1 = flag instead of reject spam"); +CFG_VALUE(INTEGER(c_guest_logins), " 1 = enable anonymous guest logins"); diff --git a/citadel/textclient/tuiconfig.c b/citadel/textclient/tuiconfig.c index 95596cd85..467baef6a 100644 --- a/citadel/textclient/tuiconfig.c +++ b/citadel/textclient/tuiconfig.c @@ -63,7 +63,7 @@ extern int screenwidth; void do_system_configuration(CtdlIPC *ipc) { -#define NUM_CONFIGS 67 +#define NUM_CONFIGS 68 char buf[256]; char sc[NUM_CONFIGS][256]; @@ -116,6 +116,9 @@ void do_system_configuration(CtdlIPC *ipc) atoi(&sc[29][0])))); strprompt("Initial access level for new users", &sc[6][0], 1); strprompt("Access level required to create rooms", &sc[19][0], 1); + snprintf(sc[67], sizeof sc[67], "%d", (boolprompt( + "Allow anonymous guest logins", + atoi(&sc[67][0])))); snprintf(sc[4], sizeof sc[4], "%d", (boolprompt( "Automatically give room aide privs to a user who creates a private room", atoi(&sc[4][0])))); -- 2.30.2