Commit e36e658c authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(aux_item_validate_existing_text): Don't allow access to texts if you

	are not logged in.  This change means that create-person
	cannot accept aux-items with the existing-readable-text
	validator if nobody is logged in.  I think this is more
	reasonable than the number of special cases in the code that
	were needed to support the old functionality.
parent 567002d5
* $Id: aux-items.c,v 1.57 2003/08/20 08:25:38 ceder Exp $
* $Id: aux-items.c,v 1.58 2003/08/20 10:25:09 ceder Exp $
* Copyright (C) 1994-2002 Lysator Academic Computer Association.
* This file is part of the LysKOM server.
......@@ -2156,17 +2156,9 @@ aux_item_validate_existing_text(Aux_item_validation_data *v_data)
text_no = s_strtol(v_data->item->data, &ill_char);
GET_T_STAT(text_stat, text_no, FAILURE);
if (text_read_access(v_data->creating_conn, text_no, text_stat))
return OK;
if (v_data->creating
&& (v_data->creating_conn == NULL
|| v_data->creating_conn->pers_no != v_data->subordinate)
&& person_text_read_access(text_no, text_stat,
v_data->subordinate, NULL))
if (v_data->creating_conn != NULL
&& text_read_access(v_data->creating_conn, text_no, text_stat))
/* This can happen e.g. if we are creating a new person and
adding a faq-text to him at the same time. */
return OK;
Supports Markdown
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