Commit 9e2033d8 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(add_recipient): Check that the user is allowed to write texts in the

conference, and fail with KOM_PERM otherwise.
parent aeb7fc96
/* /*
* $Id: text.c,v 0.30 1994/06/29 23:08:20 ceder Exp $ * $Id: text.c,v 0.31 1994/06/29 23:28:30 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994 Lysator Academic Computer Association. * Copyright (C) 1991, 1992, 1993, 1994 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
* All atomic calls that deals with texts. * All atomic calls that deals with texts.
*/ */
static char *rcsid = "$Id: text.c,v 0.30 1994/06/29 23:08:20 ceder Exp $"; static char *rcsid = "$Id: text.c,v 0.31 1994/06/29 23:28:30 ceder Exp $";
#include "rcs.h" #include "rcs.h"
USE(rcsid); USE(rcsid);
...@@ -2165,6 +2165,14 @@ add_recipient( Text_no text_no, ...@@ -2165,6 +2165,14 @@ add_recipient( Text_no text_no,
return FAILURE; return FAILURE;
} }
/* FIXME: Should extract the "is allowed to write to this conference"
test from submit_to(). */
if (submit_to(conf_no, conf_c) != conf_no)
{
kom_errno = KOM_PERM;
return FAILURE;
}
switch ( type ) switch ( type )
{ {
case recpt: case recpt:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment