* Give mailbox owners access to "who knows room" command
authorArt Cancro <ajc@citadel.org>
Tue, 12 Mar 2002 22:17:21 +0000 (22:17 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 12 Mar 2002 22:17:21 +0000 (22:17 +0000)
citadel/ChangeLog
citadel/citadel.rc
citadel/room_ops.c
citadel/rooms.c

index 66dbaca67f4995a7dca51937f3e9903f6d008fc6..65db734153880094311e1eb421f42787af44db05 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 590.147  2002/03/12 22:17:20  ajc
+ * Give mailbox owners access to "who knows room" command
+
  Revision 590.146  2002/03/12 21:08:03  nbryant
  support color under Solaris curses
 
@@ -3464,4 +3467,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
-
index 0f92c69de18cd5b59b15c6a223fe15d296c0210c..6f0fb0a44da75dd2c1a0a77f7afadc307f131378 100644 (file)
@@ -209,7 +209,7 @@ cmd=20,0,&.,&Goto:
 cmd=21,0,&.,&Help:
 cmd=22,1,&.,&Aide,&Kill this room
 cmd=23,1,&.,&Aide,&Edit this room
-cmd=24,1,&.,&Aide,&Who knows room
+cmd=24,0,&.,&Aide,&Who knows room
 cmd=25,2,&.,&Aide,edit &User
 cmd=26,2,&.,&Aide,&Validate new users
 cmd=48,1,&.,&Aide,enter &Info file
index 59eb43f179c335f7ef3b510ef9c5aa74765b8bd0..990134f28435050f78fcf25c5740d54387d11b3d 100644 (file)
@@ -868,7 +868,21 @@ void cmd_whok(void)
        struct cdbdata *cdbus;
 
        getuser(&CC->usersupp, CC->curr_user);
-       if (CtdlAccessCheck(ac_room_aide)) return;
+
+       /*
+        * This command is only allowed by aides, room aides,
+        * and room namespace owners
+        */
+       if (is_room_aide()
+          || (atol(CC->quickroom.QRname) == CC->usersupp.usernum) ) {
+               /* access granted */
+       }
+       else {
+               /* access denied */
+                cprintf("%d Higher access or room ownership required.\n",
+                        ERROR + HIGHER_ACCESS_REQUIRED);
+                return;
+        }
 
        cprintf("%d Who knows room:\n", LISTING_FOLLOWS);
        cdb_rewind(CDB_USERSUPP);
index 5f4dcb6951df02ccc7bb30390c0713587970406a..f17a70b413e6284b71855931b5efd28aab5cb572 100644 (file)
@@ -1009,7 +1009,7 @@ void whoknows(void)
        serv_puts("WHOK");
        serv_gets(buf);
        if (buf[0] != '1') {
-               pprintf("%s\n", &buf[5]);
+               pprintf("%s\n", &buf[4]);
                return;
        }
        while (serv_gets(buf), strncmp(buf, "000", 3)) {