From: Art Cancro Date: Fri, 3 Sep 2010 17:06:18 +0000 (-0400) Subject: cmd_msg*() now work properly in guest mode. This completes the minimum required... X-Git-Tag: v8.01~252^2~504 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=d81a8e5b6340cfd26f5266c08bff6dede26084c8;p=citadel.git cmd_msg*() now work properly in guest mode. This completes the minimum required functionality for an anonymous guest client to traverse public rooms and read messages. --- diff --git a/citadel/msgbase.c b/citadel/msgbase.c index a62daa15c..cd4fd5e41 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -1457,16 +1457,18 @@ void extract_encapsulated_message(char *name, char *filename, char *partnum, cha memcpy(encap->msg, content, length); return; } - } - - - - +/* + * Determine whether the currently logged in session has permission to read + * messages in the current room. + */ int CtdlDoIHavePermissionToReadMessagesInThisRoom(void) { - if ((!(CC->logged_in)) && (!(CC->internal_pgm))) { + if ( (!(CC->logged_in)) + && (!(CC->internal_pgm)) + && (!config.c_guest_logins) + ) { return(om_not_logged_in); } return(om_ok);