Open up INVT/KICK commands to non-Aides for their mailboxes.
$Log$
+ Revision 590.145 2002/03/12 19:59:40 ajc
+ * Access control change: do not treat mailboxes as guessname rooms for Aides.
+ Open up INVT/KICK commands to non-Aides for their mailboxes.
+
Revision 590.144 2002/03/12 04:30:52 nbryant
if a filesystem node exists at /var/run/egd-pool, try to connect to it as
the EGD (Entropy Gathering Daemon) or PRNGD (pseudorandom number
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
cmd=25,2,&.,&Aide,edit &User
cmd=26,2,&.,&Aide,&Validate new users
cmd=48,1,&.,&Aide,enter &Info file
-cmd=27,1,&.,&Aide,&Room,&Invite user
-cmd=28,1,&.,&Aide,&Room,&Kick out user
+cmd=27,0,&.,&Aide,&Room,&Invite user
+cmd=28,0,&.,&Aide,&Room,&Kick out user
cmd=51,1,&.,&Aide,&File,&Delete
cmd=53,1,&.,&Aide,&File,&Send over net
cmd=54,1,&.,&Aide,&File,&Move
}
/* Aides get access to everything */
- if (userbuf->axlevel >= 6) {
+ if ( (userbuf->axlevel >= 6)
+ && ((roombuf->QRflags & QR_MAILBOX) == 0) ) {
if (vbuf.v_flags & V_FORGET) {
retval = retval | UA_GOTOALLOWED;
}
- else {
- retval = retval | UA_GOTOALLOWED;
- if ((roombuf->QRflags & QR_MAILBOX) == 0) {
- retval = retval | UA_KNOWN;
- }
- }
}
NEWMSG: /* By the way, we also check for the presence of new messages */
char bbb[SIZ];
struct visit vbuf;
- if (CtdlAccessCheck(ac_room_aide))
- return;
+ /*
+ * These commands are 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;
+ }
if (lgetuser(&USscratch, iuser) != 0) {
cprintf("%d No such user.\n", ERROR);