]> code.citadel.org Git - citadel.git/commitdiff
* room_ops.c: modify CtdlRoomAccess() to allow access to mailbox rooms
authorArt Cancro <ajc@citadel.org>
Fri, 9 Oct 1998 17:47:44 +0000 (17:47 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 9 Oct 1998 17:47:44 +0000 (17:47 +0000)
          only to their owners.

citadel/ChangeLog
citadel/room_ops.c

index 8148c70dbda7e1de7ec743cc31b1d243b5045f03..50d62cc57cc093c0673ec53b5b93383896b5a4e2 100644 (file)
@@ -1,6 +1,8 @@
 Fri Oct  9 13:22:37 EDT 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Implemented "lazy mode" traversal - pressing the space bar will do
          <N>ext messsage, <G>oto next room, or read <N>ew as appropriate.
+       * room_ops.c: modify CtdlRoomAccess() to allow access to mailbox rooms
+         only to their owners.
 
 Thu Oct  8 17:13:27 EDT 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * messages.c, citadel.rc: added the ability to display message numbers
index 66b04ec0f64ac9eec3ecdd760e3cfc1cb3177926..46700e2f73db86da93733ecd2389dc11f757f0a2 100644 (file)
@@ -38,6 +38,13 @@ int CtdlRoomAccess(struct quickroom *roombuf, struct usersupp *userbuf) {
                return(UA_INUSE | UA_KNOWN | UA_GOTOALLOWED);
                }
 
+       /* For mailbox rooms, only allow access to the owner */
+       if (roombuf->QRflags & QR_MAILBOX) {
+               if (userbuf->usernum != atol(roombuf->QRname)) {
+                       return(retval);
+                       }
+               }
+
        /* Locate any applicable user/room relationships */
        CtdlGetRelationship(&vbuf, userbuf, roombuf);