Added a global config setting to allow anonymous guest logins.
authorArt Cancro <ajc@citadel.org>
Tue, 31 Aug 2010 19:56:21 +0000 (15:56 -0400)
committerArt Cancro <ajc@citadel.org>
Tue, 31 Aug 2010 19:56:21 +0000 (15:56 -0400)
This does not change any of the behavior of the system yet.

citadel/control.c
citadel/include/dtds/config-defs.h
citadel/textclient/tuiconfig.c

index 0bf7c13d340d4a3f8527470f887a1076f8f9a0b5..7048ab702c65acbc388cf07ac913baa5de6de7fc 100644 (file)
@@ -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;
                }
index d14b3b4f49b242b46939fdb998313754ac6a6cbc..cb082da33201f5fa67c2936ded059b339fc4367f 100644 (file)
@@ -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");
index 95596cd855303d15a9b544d5b14142fe90689c12..467baef6a6a0fe1292ac5c99b6349a79d9df64e9 100644 (file)
@@ -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]))));