]> code.citadel.org Git - citadel.git/blobdiff - citadel/room_ops.c
* Removed the completely redunant function get_mm()
[citadel.git] / citadel / room_ops.c
index 107cfc64b418a3bb4258c17887b55fa70af7b308..8174dc97833b485950a786a05e1fbf3d99ed2b34 100644 (file)
@@ -65,7 +65,7 @@ void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf,
        /* Force the properties of the Aide room */
        if (!strcasecmp(roombuf->QRname, config.c_aideroom)) {
                if (userbuf->axlevel >= 6) {
-                       retval = UA_KNOWN | UA_GOTOALLOWED | UA_POSTALLOWED;
+                       retval = UA_KNOWN | UA_GOTOALLOWED | UA_POSTALLOWED | UA_DELETEALLOWED;
                } else {
                        retval = 0;
                }
@@ -104,13 +104,14 @@ void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf,
        }
 
        /* For mailbox rooms, also check the namespace */
+       /* Also, mailbox owners can delete their messages */
        if (roombuf->QRflags & QR_MAILBOX) {
                if (userbuf->usernum == atol(roombuf->QRname)) {
-                       retval = retval | UA_KNOWN | UA_GOTOALLOWED | UA_POSTALLOWED;
+                       retval = retval | UA_KNOWN | UA_GOTOALLOWED | UA_POSTALLOWED | UA_DELETEALLOWED;
                }
                /* An explicit match means the user belongs in this room */
                if (vbuf.v_flags & V_ACCESS) {
-                       retval = retval | UA_KNOWN | UA_GOTOALLOWED | UA_POSTALLOWED;
+                       retval = retval | UA_KNOWN | UA_GOTOALLOWED | UA_POSTALLOWED | UA_DELETEALLOWED;
                }
        }
 
@@ -170,7 +171,7 @@ void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf,
        if ( (userbuf->axlevel >= 6)
           || (userbuf->usernum == roombuf->QRroomaide)
           ) {
-               retval = retval | UA_ADMINALLOWED;
+               retval = retval | UA_ADMINALLOWED | UA_DELETEALLOWED;
        }
 
 NEWMSG:        /* By the way, we also check for the presence of new messages */
@@ -846,7 +847,6 @@ void usergoto(char *where, int display_result, int transiently,
                info = 1;
        }
 
-       get_mm();
         cdbfr = cdb_fetch(CDB_MSGLISTS, &CC->room.QRnumber, sizeof(long));
         if (cdbfr != NULL) {
                msglist = (long *) cdbfr->ptr;