Commit 907f2cfe authored by Per Cederqvist's avatar Per Cederqvist

(filter_conf_no): New function.

parent f1b15112
/*
* $Id: manipulate.h,v 0.28 2000/09/02 19:47:56 ceder Exp $
* $Id: manipulate.h,v 0.29 2000/09/05 19:52:37 ceder Exp $
* Copyright (C) 1991-1994, 1996-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -23,7 +23,7 @@
* Please mail bug reports to bug-lyskom@lysator.liu.se.
*/
/*
* $Id: manipulate.h,v 0.28 2000/09/02 19:47:56 ceder Exp $
* $Id: manipulate.h,v 0.29 2000/09/05 19:52:37 ceder Exp $
*
* manipulate.h
*
......@@ -215,6 +215,14 @@ access_perm(Conf_no victim,
const Connection *viewer_conn,
Access wanted_access);
/* Return VICTIM if the user user logged in via VIEWER_CONN is allowed
to see it, or 0 if it is a secret conference that the user isn't
allowed to see. */
extern Conf_no
filter_conf_no(Conf_no victim,
const Connection *viewer_conn);
/*
......
/*
* $Id: membership.c,v 0.56 2000/09/02 19:50:33 ceder Exp $
* $Id: membership.c,v 0.57 2000/09/05 19:53:41 ceder Exp $
* Copyright (C) 1991-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -38,7 +38,7 @@
#define DEBUG_MARK_AS_READ
static const char *
rcsid = "$Id: membership.c,v 0.56 2000/09/02 19:50:33 ceder Exp $";
rcsid = "$Id: membership.c,v 0.57 2000/09/05 19:53:41 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -819,6 +819,16 @@ access_perm(Conf_no victim,
}
Conf_no
filter_conf_no(Conf_no victim,
const Connection *viewer_conn)
{
if (access_perm(victim, viewer_conn, read_protected) >= read_protected)
return victim;
else
return 0;
}
/*
* Locate the Member struct in CONF_C for person PERS_NO
......
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