From e0233091b3bd706bd0623388e901aaa89fdf4741 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 3 Sep 2010 10:19:49 -0400 Subject: [PATCH] CtdlRoomAccess() now returns a set of read-only access rights if the room is BASEROOM (Lobby) and the user is not logged in. --- citadel/room_ops.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/citadel/room_ops.c b/citadel/room_ops.c index 83d68a347..afa6af513 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -60,6 +60,13 @@ void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf, goto SKIP_EVERYTHING; } + /* If guest mode is enabled, always grant access to the Lobby */ + if ( (!CC->logged_in) && (config.c_guest_logins) && (!strcasecmp(roombuf->QRname, BASEROOM)) ) { + retval = (UA_KNOWN | UA_GOTOALLOWED); + vbuf.v_view = 0; + goto SKIP_EVERYTHING; + } + /* Locate any applicable user/room relationships */ CtdlGetRelationship(&vbuf, userbuf, roombuf); @@ -1077,7 +1084,7 @@ void cmd_goto(char *gargs) char password[32]; int transiently = 0; - if (CtdlAccessCheck(ac_logged_in)) return; + if ((!config.c_guest_logins) && (CtdlAccessCheck(ac_logged_in))) return; extract_token(towhere, gargs, 0, '|', sizeof towhere); extract_token(password, gargs, 1, '|', sizeof password); -- 2.30.2