Commit 587345f9 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Simplify handling of the sent_by misc-info. Allow the supervisor of

the author and sender to modify or remove a recipient (Bug 966, Bug
181 and Bug 1089).  Don't allow a text to be both a footnote and a
comment of the same text at the same time (Bug 1090).  Code cleanup.
parent 586353e9
2003-08-17 Per Cederqvist <ceder@ceder.dyndns.org>
Simplify handling of the sent_by misc-info. Allow the supervisor
of the author and sender to modify or remove a recipient (Bug 966,
Bug 181 and Bug 1089). Don't allow a text to be both a footnote
and a comment of the same text at the same time (Bug 1090). Code
cleanup.
* doc/Protocol-A.texi (add-comment): Added error codes
already-comment and already-footnote.
(add-footnote): Added error codes already-comment.
* src/server/text.c (find_textlink): New static function.
(is_supervisor_of_sender): New static function.
(is_sender): Removed.
(is_comm_sender): Removed.
(is_comment_to): Removed.
(recp_sent_by): Removed.
(is_footnote_to): Removed.
(sender): Removed.
(do_add_footnote): New arguments: the Text_stat objects. All
callers updated.
(do_add_comment): Ditto.
(do_add_recipient): The text_s argument may no longer be NULL.
All callers updated.
(skip_recp): New simplified API.
(filter_secret_info): Use is_supervisor_of_sender() instead of
recp_sent_by(). Use the new API of is_supervisor().
(person_text_read_access): Use is_supervisor_2() instead of
is_supervisor() until bug 178 is fixed.
(create_text_add_miscs): New argument: new_stat. Pass it to
do_add_footnote(), do_add_comment() and do_add_recipient() for a
slight performance gain. All callers updated.
(delete_text): Use new API of is_supervisor().
(add_recipient): Allow the supervisor of the author to modify the
recipient (fixes bug 966). Allow the supervisor of the sender to
modify the recipient (fixes bug 181).
(sub_recipient): Use the new API of is_supervisor(). Allow the
supervisor of the sender to remove the recipient (fixes bug
1089).
(check_add_textlink): New helper function with the common parts of
add_comment() and add_footnote(). Don't allow a text to be both a
footnote and a comment of the same text at the same time (fixes
bug 1090).
(add_comment): Move code to check_add_textlink().
(sub_comment): Use find_textlink() instead of is_comment_to().
Use new API of is_supervisor(). Allow the supervisor of the
sender to remove the comment link.
(add_footnote): Use check_add_textlink() to simplify the code.
(sub_footnote): Use find_textlink() instead of is_footnote_to().
Use new API of is_supervisor().
* src/server/session.c (login_old): Use new API of
is_supervisor(). Simplify and reindent code.
(login): Ditto.
(disconnect): Ditto.
* src/server/person.c (set_passwd): Use new API of
is_supervisor(). Simplify and reindent code.
* src/server/membership.c (access_perm_helper): Use new API of
is_supervisor(). Simplify and reindent code.
(sub_member): Ditto.
(add_member_common): Ditto.
(do_get_members): Ditto.
* src/server/conference.c (is_supervisor): Replaced the Pers_no
and Person arguments with a Connection argument.
(is_supervisor_2): New function, with the old API of
is_supervisor().
(set_permitted_submitters): Use new API of is_supervisor().
(set_super_conf): Ditto.
* src/server/aux-items.c (filter_aux_item_list): Use new API of
is_supervisor().
(check_delete_aux_item_list): Ditto.
* src/server/manipulate.h (is_supervisor): Replaced the Pers_no
and Person arguments with a Connection argument.
(is_supervisor_2): New function, with the old API of
is_supervisor(). This is only used in one place, and will be
removed when bug 178 is fixed.
* src/server/testsuite/lyskomd.0/44.exp: Bugs 966, 181, 1089 and
1090 are now fixed.
* src/server/testsuite/lyskomd.0/14.exp: Bug 181 is now fixed.
Added test cases for bug 1090.
* src/server/testsuite/lyskomd.0/44.exp: Added test cases for bug
1090.
......
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