int screenwidth;
int screenheight;
unsigned room_flags;
+unsigned room_flags2;
char room_name[ROOMNAMELEN];
char *uglist[UGLISTLEN]; /* size of the ungoto list */
long uglistlsn[UGLISTLEN]; /* current read position for all the ungoto's. Not going to make any friends with this one. */
}
safestrncpy(room_name, room->RRname, ROOMNAMELEN);
room_flags = room->RRflags;
+ room_flags = room->RRflags2;
from_floor = curr_floor;
curr_floor = room->RRfloor;
* usually more strict because you're not really supposed to dump/load and
* upgrade at the same time.
*/
-#define REV_LEVEL 706 /* This version */
+#define REV_LEVEL 707 /* This version */
#define REV_MIN 591 /* Oldest compatible database */
#define EXPORT_REV_MIN 706 /* Oldest compatible export files */
!include "${NSISDIR}\Contrib\Modern UI\System.nsh"
!define MUI_PRODUCT "Citadel"
-!define MUI_VERSION "7.06"
+!define MUI_VERSION "7.07"
!define MUI_WELCOMEPAGE
!define MUI_LICENSEPAGE
!define MUI_COMPONENTSPAGE
;!define MUI_ICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
;!define MUI_UNICON "${NSISDIR}\Contrib\Icons\modern-uninstall.ico"
-OutFile "citadel-7.06.exe"
+OutFile "citadel-7.07.exe"
BGGradient off
LangString DESC_Citadel ${LANG_ENGLISH} "Citadel client and core libraries (required)"
rret[0]->RRaide = extract_int(cret, 8);
rret[0]->RRnewmail = extract_long(cret, 9);
rret[0]->RRfloor = extract_int(cret, 10);
+ rret[0]->RRflags2 = extract_int(cret, 14);
} else {
free(*rret);
*rret = NULL;
long RRtotal; /* Total number of messages in room */
char RRinfoupdated; /* Nonzero if info was updated */
unsigned RRflags; /* Various flags (see LKRN) */
+ unsigned RRflags2; /* Various flags (see LKRN) */
long RRhighest; /* Highest message number in room */
long RRlastread; /* Highest message user has read */
char RRismailbox; /* Is this room a mailbox room? */
dnl Process this file with autoconf to produce a configure script.
dnl $Id$
AC_PREREQ(2.52)
-AC_INIT([Citadel], [7.06], [http://www.citadel.org/])
+AC_INIT([Citadel], [7.07], [http://www.citadel.org/])
AC_REVISION([$Revision$])
AC_CONFIG_SRCDIR([citserver.c])
AC_PREFIX_DEFAULT(/usr/local/citadel)
#define QR2_SYSTEM 1 /* System room; hide by default */
#define QR2_SELFLIST 2 /* Self-service mailing list mgmt */
+#define QR2_COLLABDEL 4 /* Anyone who can post can delete */
#define US_NEEDVALID 1 /* User needs to be validated */
#define US_EXTEDIT 2 /* Always use external editor */
char rc_alt_semantics;
extern char room_name[];
extern unsigned room_flags;
+extern unsigned room_flags2;
extern long highest_msg_read;
extern char temp[];
extern char temp2[];
/* space key same as <N> */ if (e == 32)
e = 'n';
/* del/move for aides only */
- if ((!is_room_aide)
- && ((room_flags & QR_MAILBOX) ==
- 0)) {
+ if ( (!is_room_aide)
+ && ((room_flags & QR_MAILBOX) == 0)
+ && ((room_flags2 & QR2_COLLABDEL) == 0)
+ ) {
if ((e == 'd') || (e == 'm'))
e = 0;
}
" N Next (continue with next message)\n"
" Y My Next (continue with next message you authored)\n"
" B Back (go back to previous message)\n");
- if ((is_room_aide)
- || (room_flags & QR_MAILBOX)) {
+ if ( (is_room_aide)
+ || (room_flags & QR_MAILBOX)
+ || (room_flags2 & QR2_COLLABDEL)
+ ) {
scr_printf(" D Delete this message\n"
" M Move message to another room\n");
}
struct floor *floorcache[MAXFLOORS];
/*
- * Generic routine for determining user access to rooms
+ * Retrieve access control information for any user/room pair
*/
void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf,
int *result, int *view)
retval = retval | UA_POSTALLOWED;
}
+ /* If "collaborative deletion" is active for this room, any user who can post
+ * is also allowed to delete
+ */
+ if (CC->room.QRflags2 & QR2_COLLABDEL) {
+ if (retval & UA_POSTALLOWED) {
+ retval = retval | UA_DELETEALLOWED;
+ }
+ }
+
}
/* Check to see if the user has forgotten this room */
CC->curr_view = (int)vbuf.v_view;
if (display_result) {
- cprintf("%d%c%s|%d|%d|%d|%d|%ld|%ld|%d|%d|%d|%d|%d|%d|%d|\n",
+ cprintf("%d%c%s|%d|%d|%d|%d|%ld|%ld|%d|%d|%d|%d|%d|%d|%d|%d|\n",
CIT_OK, CtdlCheckExpress(),
truncated_roomname,
(int)new_messages,
(int)CC->room.QRfloor,
(int)vbuf.v_view,
(int)CC->room.QRdefaultview,
- (int)is_trash
+ (int)is_trash,
+ (int)CC->room.QRflags2
);
}
}
"Preferred users only", QR_PREFONLY);
attr->QRflags = set_room_attr(ipc, attr->QRflags,
"Read-only room", QR_READONLY);
- attr->QRflags = set_room_attr(ipc, attr->QRflags,
- "Directory room", QR_DIRECTORY);
+ attr->QRflags2 = set_room_attr(ipc, attr->QRflags2,
+ "Allow message deletion by anyone who can post",
+ QR2_COLLABDEL);
attr->QRflags = set_room_attr(ipc, attr->QRflags,
"Permanent room", QR_PERMANENT);
+ attr->QRflags = set_room_attr(ipc, attr->QRflags,
+ "Directory room", QR_DIRECTORY);
if (attr->QRflags & QR_DIRECTORY) {
strprompt("Directory name", attr->QRdirname, 14);
attr->QRflags =
"Ask users whether to make messages anonymous",
QR_ANONOPT);
}
- attr->QRorder = intprompt("Listing order", attr->QRorder, 1, 127);
+ attr->QRorder = intprompt("Listing order", attr->QRorder, 0, 127);
/* Ask about the room aide */
do {