From: Art Cancro Date: Tue, 16 Aug 2011 04:03:58 +0000 (-0400) Subject: Began working on access control changes for blog rooms. X-Git-Tag: v8.11~522 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=6feba01910d1fa3e1ce5ec232bce54aaf900cd6f;hp=1df0e56b889aeba0de52efeb89022ceeee0af261;p=citadel.git Began working on access control changes for blog rooms. --- 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; }