From: Art Cancro Date: Wed, 13 Mar 2002 03:58:29 +0000 (+0000) Subject: * Site-configurable option "Allow system Aides to gain access to mailboxes" X-Git-Tag: v7.86~6476 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=7abba6579315c6b422153f6f5cc5c063daf80d98;p=citadel.git * Site-configurable option "Allow system Aides to gain access to mailboxes" --- diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 68a68579e..adedc4f6c 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,7 @@ $Log$ + Revision 590.151 2002/03/13 03:58:29 ajc + * Site-configurable option "Allow system Aides to gain access to mailboxes" + Revision 590.150 2002/03/13 03:34:38 nbryant /* when running in curses mode, the scroll bar in most xterm-style programs becomes useless, so it makes sense to @@ -3496,4 +3499,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/citadel.h b/citadel/citadel.h index 2880926b6..dbc155ea1 100644 --- a/citadel/citadel.h +++ b/citadel/citadel.h @@ -119,6 +119,7 @@ struct config { int c_imap_port; /* IMAP listener port (usually 143) */ time_t c_net_freq; /* how often to run the networker */ char c_disable_newu; /* disable NEWU command */ + char c_aide_mailboxes; /* give Aides access to mailboxes */ }; #define NODENAME config.c_nodename diff --git a/citadel/control.c b/citadel/control.c index 470b788ba..84dd97b68 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -188,6 +188,7 @@ void cmd_conf(char *argbuf) { cprintf("%d\n", config.c_imap_port); cprintf("%ld\n", config.c_net_freq); cprintf("%d\n", config.c_disable_newu); + cprintf("%d\n", config.c_aide_mailboxes); cprintf("000\n"); } @@ -285,6 +286,10 @@ void cmd_conf(char *argbuf) { if (config.c_disable_newu != 0) config.c_disable_newu = 1; break; + case 30: config.c_aide_mailboxes = atoi(buf); + if (config.c_aide_mailboxes != 0) + config.c_aide_mailboxes = 1; + break; } ++a; } diff --git a/citadel/room_ops.c b/citadel/room_ops.c index 990134f28..af8f6c982 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -128,12 +128,22 @@ int CtdlRoomAccess(struct quickroom *roombuf, struct usersupp *userbuf) retval = retval & ~UA_KNOWN & ~UA_GOTOALLOWED; } - /* Aides get access to everything */ + /* Aides get access to all private rooms */ if ( (userbuf->axlevel >= 6) && ((roombuf->QRflags & QR_MAILBOX) == 0) ) { if (vbuf.v_flags & V_FORGET) { retval = retval | UA_GOTOALLOWED; } + else { + retval = retval | UA_KNOWN | UA_GOTOALLOWED; + } + } + + /* On some systems, Aides can gain access to mailboxes as well */ + if ( (config.c_aide_mailboxes) + && (userbuf->axlevel >= 6) + && (roombuf->QRflags & QR_MAILBOX) ) { + retval = retval | UA_GOTOALLOWED; } NEWMSG: /* By the way, we also check for the presence of new messages */ diff --git a/citadel/routines2.c b/citadel/routines2.c index e66ac3ce0..c38531e42 100644 --- a/citadel/routines2.c +++ b/citadel/routines2.c @@ -690,7 +690,7 @@ void read_bio(void) void do_system_configuration(void) { char buf[SIZ]; - char sc[30][SIZ]; + char sc[31][SIZ]; int expire_mode = 0; int expire_value = 0; int a; @@ -705,7 +705,7 @@ void do_system_configuration(void) if (buf[0] == '1') { a = 0; while (serv_gets(buf), strcmp(buf, "000")) { - if (a < 30) { + if (a < 31) { strcpy(&sc[a][0], buf); } ++a; @@ -761,6 +761,9 @@ void do_system_configuration(void) snprintf(sc[26], sizeof sc[26], "%d", (boolprompt( "Allow Aides to Zap (forget) rooms", atoi(&sc[26][0])))); + snprintf(sc[30], sizeof sc[29], "%d", (boolprompt( + "Allow system Aides access to user mailboxes", + atoi(&sc[30][0])))); if (strlen(&sc[18][0]) > 0) logpages = 1; else logpages = 0; @@ -825,7 +828,7 @@ void do_system_configuration(void) serv_puts("CONF set"); serv_gets(buf); if (buf[0] == '4') { - for (a = 0; a < 30; ++a) + for (a = 0; a < 31; ++a) serv_puts(&sc[a][0]); serv_puts("000"); }