From 3cbc25baf80636279d4bf9a46a333e1389e07a84 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 12 Mar 2002 22:17:21 +0000 Subject: [PATCH] * Give mailbox owners access to "who knows room" command --- citadel/ChangeLog | 4 +++- citadel/citadel.rc | 2 +- citadel/room_ops.c | 16 +++++++++++++++- citadel/rooms.c | 2 +- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 66dbaca67..65db73415 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -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 Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/citadel.rc b/citadel/citadel.rc index 0f92c69de..6f0fb0a44 100644 --- a/citadel/citadel.rc +++ b/citadel/citadel.rc @@ -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 diff --git a/citadel/room_ops.c b/citadel/room_ops.c index 59eb43f17..990134f28 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -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); diff --git a/citadel/rooms.c b/citadel/rooms.c index 5f4dcb695..f17a70b41 100644 --- a/citadel/rooms.c +++ b/citadel/rooms.c @@ -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)) { -- 2.39.2