From 6feba01910d1fa3e1ce5ec232bce54aaf900cd6f Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 16 Aug 2011 00:03:58 -0400 Subject: [PATCH] Began working on access control changes for blog rooms. --- citadel/room_ops.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/citadel/room_ops.c b/citadel/room_ops.c index 1c68a340c..fbea0f270 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -163,6 +163,7 @@ void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf, * - User is not validated * - User has no net privileges and it is a shared network room * - It is a read-only room + * - It is a blog room (in which case we only allow replies to existing messages) */ int post_allowed = 1; int reply_allowed = 1; @@ -178,6 +179,9 @@ void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf, post_allowed = 0; reply_allowed = 0; } + if (roombuf->QRdefaultview == VIEW_BLOG) { + post_allowed = 0; + } if (post_allowed) { retval = retval | UA_POSTALLOWED | UA_REPLYALLOWED; } -- 2.30.2