From: Wilfried Göesgens Date: Fri, 26 Feb 2010 18:11:39 +0000 (+0000) Subject: * use eUsrAxlvl all over the place X-Git-Tag: v7.86~372 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=7b4383dd73b617754c1a495859ea134eabd196ca * use eUsrAxlvl all over the place --- diff --git a/citadel/citserver.c b/citadel/citserver.c index 054bf5068..f371d6bf5 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -680,7 +680,7 @@ int CtdlAccessCheck(int required_level) { return(-1); } - if (CC->user.axlevel >= 6) return(0); + if (CC->user.axlevel >= AxAideU) return(0); if (required_level >= ac_aide) { cprintf("%d This command requires Aide access.\n", ERROR + HIGHER_ACCESS_REQUIRED); diff --git a/citadel/context.c b/citadel/context.c index ffe87a09a..90516d7d8 100644 --- a/citadel/context.c +++ b/citadel/context.c @@ -164,7 +164,7 @@ int CtdlTerminateOtherSession (int session_num) if (session_num == ccptr->cs_pid) { ret |= TERM_FOUND; if ((ccptr->user.usernum == CC->user.usernum) - || (CC->user.axlevel >= 6)) { + || (CC->user.axlevel >= AxAideU)) { ret |= TERM_ALLOWED; ccptr->kill_me = 1; } diff --git a/citadel/file_ops.c b/citadel/file_ops.c index 6f0669093..96e00a0fd 100644 --- a/citadel/file_ops.c +++ b/citadel/file_ops.c @@ -470,7 +470,7 @@ void cmd_uimg(char *cmdbuf) } } - if (CC->user.axlevel >= 6) { + if (CC->user.axlevel >= AxAideU) { snprintf(CC->upl_path, sizeof CC->upl_path, "%s/%s", ctdl_image_dir, @@ -485,7 +485,7 @@ void cmd_uimg(char *cmdbuf) } if ((!strcasecmp(basenm, "_floorpic_")) - && (CC->user.axlevel >= 6)) { + && (CC->user.axlevel >= AxAideU)) { which_floor = extract_int(cmdbuf, 2); snprintf(CC->upl_path, sizeof CC->upl_path, "%s/floor.%d.gif", diff --git a/citadel/modules/chat/serv_chat.c b/citadel/modules/chat/serv_chat.c index 028f2833b..32e2f629b 100644 --- a/citadel/modules/chat/serv_chat.c +++ b/citadel/modules/chat/serv_chat.c @@ -294,7 +294,7 @@ void do_chat_listing(int allflag) } GenerateRoomDisplay(roomname, ccptr, CC); - if ((CC->user.axlevel < 6) && (!IsEmptyStr(ccptr->fake_roomname))) { + if ((CC->user.axlevel < AxAideU) && (!IsEmptyStr(ccptr->fake_roomname))) { strcpy(roomname, ccptr->fake_roomname); } @@ -312,7 +312,7 @@ void do_chat_listing(int allflag) for (ccptr = ContextList; ccptr != NULL; ccptr = ccptr->next) { GenerateRoomDisplay(roomname, ccptr, CC); - if ((CC->user.axlevel < 6) + if ((CC->user.axlevel < AxAideU) && (!IsEmptyStr(ccptr->fake_roomname))) { strcpy(roomname, ccptr->fake_roomname); } @@ -692,7 +692,7 @@ int send_instant_message(char *lun, char *lem, char *x_user, char *x_msg) || (!strcasecmp(x_user, "broadcast"))) && (ccptr->can_receive_im) && ((ccptr->disable_exp == 0) - || (CC->user.axlevel >= 6)) ) { + || (CC->user.axlevel >= AxAideU)) ) { if (do_send) { newmsg = (struct ExpressMessage *) malloc(sizeof (struct ExpressMessage)); memset(newmsg, 0, sizeof (struct ExpressMessage)); @@ -748,7 +748,7 @@ void cmd_sexp(char *argbuf) cprintf("%d You were not previously paged.\n", ERROR + NO_SUCH_USER); return; } - if ((!strcasecmp(x_user, "broadcast")) && (CC->user.axlevel < 6)) { + if ((!strcasecmp(x_user, "broadcast")) && (CC->user.axlevel < AxAideU)) { cprintf("%d Higher access required to send a broadcast.\n", ERROR + HIGHER_ACCESS_REQUIRED); return; diff --git a/citadel/modules/rwho/serv_rwho.c b/citadel/modules/rwho/serv_rwho.c index 9a1944061..6c2c9dc73 100644 --- a/citadel/modules/rwho/serv_rwho.c +++ b/citadel/modules/rwho/serv_rwho.c @@ -90,7 +90,7 @@ void cmd_rwho(char *argbuf) { return; } - aide = CC->user.axlevel >= 6; + aide = CC->user.axlevel >= AxAideU; cprintf("%d%c \n", LISTING_FOLLOWS, CtdlCheckExpress() ); for (i=0; iuser.axlevel < 6) { + if (CC->user.axlevel < AxAideU) { return(1); } #endif @@ -360,7 +360,7 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) { if (v == NULL) return(0); /* no vCards were found in this message */ /* If users cannot create their own accounts, they cannot re-register either. */ - if ( (yes_my_citadel_config) && (config.c_disable_newu) && (CC->user.axlevel < 6) ) { + if ( (yes_my_citadel_config) && (config.c_disable_newu) && (CC->user.axlevel < AxAideU) ) { return(1); } @@ -552,7 +552,7 @@ int vcard_upload_aftersave(struct CtdlMessage *msg) { * But if the user was an Aide or was edited by an Aide then we can * Assume they don't need validating. */ - if (CC->user.axlevel >= 6) { + if (CC->user.axlevel >= AxAideU) { CtdlGetUserLock(&CC->user, CC->curr_user); CC->user.flags |= US_REGIS; CtdlPutUserLock(&CC->user); @@ -685,7 +685,7 @@ void cmd_regi(char *argbuf) { } /* If users cannot create their own accounts, they cannot re-register either. */ - if ( (config.c_disable_newu) && (CC->user.axlevel < 6) ) { + if ( (config.c_disable_newu) && (CC->user.axlevel < AxAideU) ) { cprintf("%d Self-service registration is not allowed here.\n", ERROR + HIGHER_ACCESS_REQUIRED); } @@ -748,7 +748,7 @@ void cmd_greg(char *argbuf) if (!strcasecmp(who,"_SELF_")) strcpy(who,CC->curr_user); - if ((CC->user.axlevel < 6) && (strcasecmp(who,CC->curr_user))) { + if ((CC->user.axlevel < AxAideU) && (strcasecmp(who,CC->curr_user))) { cprintf("%d Higher access required.\n", ERROR + HIGHER_ACCESS_REQUIRED); return; diff --git a/citadel/modules/xmpp/xmpp_presence.c b/citadel/modules/xmpp/xmpp_presence.c index 141b2d3fd..915f1d319 100644 --- a/citadel/modules/xmpp/xmpp_presence.c +++ b/citadel/modules/xmpp/xmpp_presence.c @@ -81,7 +81,7 @@ void xmpp_wholist_presence_dump(void) struct CitContext *cptr = NULL; int nContexts, i; - int aide = (CC->user.axlevel >= 6); + int aide = (CC->user.axlevel >= AxAideU); cptr = CtdlGetContextArray(&nContexts); if (!cptr) { @@ -143,7 +143,7 @@ void xmpp_presence_notify(char *presence_jid, int event_type) { static int unsolicited_id; int visible_sessions = 0; int nContexts, i; - int aide = (CC->user.axlevel >= 6); + int aide = (CC->user.axlevel >= AxAideU); if (IsEmptyStr(presence_jid)) return; if (CC->kill_me) return; @@ -209,7 +209,7 @@ void xmpp_massacre_roster(void) { struct CitContext *cptr; int nContexts, i; - int aide = (CC->user.axlevel >= 6); + int aide = (CC->user.axlevel >= AxAideU); cptr = CtdlGetContextArray(&nContexts); if (cptr) { diff --git a/citadel/modules/xmpp/xmpp_query_namespace.c b/citadel/modules/xmpp/xmpp_query_namespace.c index 42875074e..a94e6d6d1 100644 --- a/citadel/modules/xmpp/xmpp_query_namespace.c +++ b/citadel/modules/xmpp/xmpp_query_namespace.c @@ -81,7 +81,7 @@ void xmpp_iq_roster_query(void) { struct CitContext *cptr; int nContexts, i; - int aide = (CC->user.axlevel >= 6); + int aide = (CC->user.axlevel >= AxAideU); cprintf(""); diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 87641e3ee..df4d224d0 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -2875,7 +2875,7 @@ long CtdlSubmitMsg(struct CtdlMessage *msg, /* message to save */ /* If the user is a twit, move to the twit room for posting */ if (TWITDETECT) { - if (CCC->user.axlevel == 2) { + if (CCC->user.axlevel == AxProbU) { strcpy(hold_rm, actual_rm); strcpy(actual_rm, config.c_twitroom); CtdlLogPrintf(CTDL_DEBUG, "Diverting to twit room\n"); @@ -3546,7 +3546,7 @@ int CtdlDoIHavePermissionToPostInThisRoom(char *errmsgbuf, } - if ((CC->user.axlevel < 2) + if ((CC->user.axlevel < AxProbU) && ((CC->room.QRflags & QR_MAILBOX) == 0)) { snprintf(errmsgbuf, n, "Need to be validated to enter " "(except in %s> to sysop)", MAILROOM); @@ -3571,7 +3571,7 @@ int CtdlDoIHavePermissionToPostInThisRoom(char *errmsgbuf, int CtdlCheckInternetMailPermission(struct ctdluser *who) { /* Do not allow twits to send Internet mail */ - if (who->axlevel <= 2) return(0); + if (who->axlevel <= AxProbU) return(0); /* Globally enabled? */ if (config.c_restrict == 0) return(1); @@ -3580,7 +3580,7 @@ int CtdlCheckInternetMailPermission(struct ctdluser *who) { if (who->flags & US_INTERNET) return(2); /* Aide level access? */ - if (who->axlevel >= 6) return(3); + if (who->axlevel >= AxAideU) return(3); /* No mail for you! */ return(0); @@ -3932,7 +3932,7 @@ void cmd_ent0(char *entargs) if (IsEmptyStr(newusername)) { strcpy(newusername, CC->user.fullname); } - if ( (CC->user.axlevel < 6) + if ( (CC->user.axlevel < AxAideU) && (strcasecmp(newusername, CC->user.fullname)) && (strcasecmp(newusername, CC->cs_inet_fn)) ) { @@ -3982,7 +3982,7 @@ void cmd_ent0(char *entargs) if ( ( (CC->room.QRflags & QR_MAILBOX) && (!strcasecmp(&CC->room.QRname[11], MAILROOM)) ) || ( (CC->room.QRflags & QR_MAILBOX) && (CC->curr_view == VIEW_MAILBOX) ) ) { - if (CC->user.axlevel < 2) { + if (CC->user.axlevel < AxProbU) { strcpy(recp, "sysop"); strcpy(cc, ""); strcpy(bcc, ""); @@ -4034,7 +4034,7 @@ void cmd_ent0(char *entargs) } if ( ( (valid_to->num_internet + valid_to->num_ignet + valid_cc->num_internet + valid_cc->num_ignet + valid_bcc->num_internet + valid_bcc->num_ignet) > 0) - && (CC->user.axlevel < 4) ) { + && (CC->user.axlevel < AxNetU) ) { cprintf("%d Higher access required for network mail.\n", ERROR + HIGHER_ACCESS_REQUIRED); free_recipients(valid_to); @@ -4393,7 +4393,7 @@ void cmd_move(char *args) permit = 0; /* Aides can move/copy */ - if (CC->user.axlevel >= 6) permit = 1; + if (CC->user.axlevel >= AxAideU) permit = 1; /* Room aides can move/copy */ if (CC->user.usernum == CC->room.QRroomaide) permit = 1; diff --git a/citadel/policy.c b/citadel/policy.c index acfb91644..52d3c697d 100644 --- a/citadel/policy.c +++ b/citadel/policy.c @@ -138,7 +138,7 @@ void cmd_spex(char *argbuf) { return; } - if (CC->user.axlevel < 6) { + if (CC->user.axlevel < AxAideU) { cprintf("%d Higher access required.\n", ERROR + HIGHER_ACCESS_REQUIRED); return; diff --git a/citadel/room_ops.c b/citadel/room_ops.c index 5904b41eb..baf2b4bf6 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -67,7 +67,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) { + if (userbuf->axlevel >= AxAideU) { retval = UA_KNOWN | UA_GOTOALLOWED | UA_POSTALLOWED | UA_DELETEALLOWED; } else { retval = 0; @@ -83,7 +83,7 @@ void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf, /* If this is a preferred users only room, check access level */ if (roombuf->QRflags & QR_PREFONLY) { - if (userbuf->axlevel < 5) { + if (userbuf->axlevel < AxPrefU) { retval = retval & ~UA_KNOWN & ~UA_GOTOALLOWED; } } @@ -127,8 +127,8 @@ void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf, * - It is a read-only room */ int post_allowed = 1; - if (CC->user.axlevel < 2) post_allowed = 0; - if ((CC->user.axlevel < 4) && (CC->room.QRflags & QR_NETWORK)) post_allowed = 0; + if (CC->user.axlevel < AxProbU) post_allowed = 0; + if ((CC->user.axlevel < AxNetU) && (CC->room.QRflags & QR_NETWORK)) post_allowed = 0; if (roombuf->QRflags & QR_READONLY) post_allowed = 0; if (post_allowed) { retval = retval | UA_POSTALLOWED; @@ -161,7 +161,7 @@ void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf, } /* Aides get access to all private rooms */ - if ( (userbuf->axlevel >= 6) + if ( (userbuf->axlevel >= AxAideU) && ((roombuf->QRflags & QR_MAILBOX) == 0) ) { if (vbuf.v_flags & V_FORGET) { retval = retval | UA_GOTOALLOWED | UA_POSTALLOWED; @@ -174,13 +174,13 @@ void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf, /* Aides can gain access to mailboxes as well, but they don't show * by default. */ - if ( (userbuf->axlevel >= 6) + if ( (userbuf->axlevel >= AxAideU) && (roombuf->QRflags & QR_MAILBOX) ) { retval = retval | UA_GOTOALLOWED | UA_POSTALLOWED; } /* Aides and Room Aides have admin privileges */ - if ( (userbuf->axlevel >= 6) + if ( (userbuf->axlevel >= AxAideU) || (userbuf->usernum == roombuf->QRroomaide) ) { retval = retval | UA_ADMINALLOWED | UA_DELETEALLOWED | UA_POSTALLOWED; @@ -984,7 +984,7 @@ void CtdlUserGoto(char *where, int display_result, int transiently, rmailflag = 0; if ((CC->room.QRroomaide == CC->user.usernum) - || (CC->user.axlevel >= 6)) + || (CC->user.axlevel >= AxAideU)) raideflag = 1; else raideflag = 0; @@ -1133,7 +1133,7 @@ void cmd_goto(char *gargs) } else if ((QRscratch.QRflags & QR_PASSWORDED) && ((ra & UA_KNOWN) == 0) && (strcasecmp(QRscratch.QRpasswd, password)) && - (CC->user.axlevel < 6) + (CC->user.axlevel < AxAideU) ) { cprintf("%d wrong or missing passwd\n", ERROR + PASSWORD_REQUIRED); @@ -1142,7 +1142,7 @@ void cmd_goto(char *gargs) ((QRscratch.QRflags & QR_PASSWORDED) == 0) && ((QRscratch.QRflags & QR_GUESSNAME) == 0) && ((ra & UA_KNOWN) == 0) && - (CC->user.axlevel < 6) + (CC->user.axlevel < AxAideU) ) { CtdlLogPrintf(CTDL_DEBUG, "Failed to acquire private room\n"); } else { @@ -1207,7 +1207,7 @@ void cmd_rdir(char *cmdbuf) return; } if (((CC->room.QRflags & QR_VISDIR) == 0) - && (CC->user.axlevel < 6) + && (CC->user.axlevel < AxAideU) && (CC->user.usernum != CC->room.QRroomaide)) { cprintf("%d not here.\n", ERROR + HIGHER_ACCESS_REQUIRED); return; @@ -1344,7 +1344,7 @@ int CtdlRenameRoom(char *old_name, char *new_name, int new_floor) { ret = crr_room_not_found; } - else if ( (CC->user.axlevel < 6) && (!CC->internal_pgm) + else if ( (CC->user.axlevel < AxAideU) && (!CC->internal_pgm) && (CC->user.usernum != qrbuf.QRroomaide) && ( (((qrbuf.QRflags & QR_MAILBOX) == 0) || (atol(qrbuf.QRname) != CC->user.usernum))) ) { ret = crr_access_denied; @@ -1985,7 +1985,7 @@ void cmd_cre8(char *args) } if (new_room_type == 5) { - if (CC->user.axlevel < 6) { + if (CC->user.axlevel < AxAideU) { cprintf("%d Higher access required\n", ERROR + HIGHER_ACCESS_REQUIRED); return; diff --git a/citadel/textclient/citadel.c b/citadel/textclient/citadel.c index a50b8a85f..b1abf2947 100644 --- a/citadel/textclient/citadel.c +++ b/citadel/textclient/citadel.c @@ -73,8 +73,8 @@ #define IFEXPERT if (userflags&US_EXPERT) #define IFNEXPERT if ((userflags&US_EXPERT)==0) -#define IFAIDE if (axlevel>=6) -#define IFNAIDE if (axlevel<6) +#define IFAIDE if (axlevel>=AxAideU) +#define IFNAIDE if (axlevel= 6) && (chek.needvalid > 0)) { + if ((axlevel >= AxAideU) && (chek.needvalid > 0)) { scr_printf("*** Users need validation\n"); } if (chek.needregis > 0) { diff --git a/citadel/textclient/messages.c b/citadel/textclient/messages.c index 0434cd36d..20ab408a0 100644 --- a/citadel/textclient/messages.c +++ b/citadel/textclient/messages.c @@ -1147,7 +1147,7 @@ int entmsg(CtdlIPC *ipc, /* Handle the selection of a recipient, if necessary. */ strcpy(buf, ""); if (need_recp == 1) { - if (axlevel >= 2) { + if (axlevel >= AxProbU) { if (is_reply) { strcpy(buf, reply_to); } else { diff --git a/citadel/textclient/routines.c b/citadel/textclient/routines.c index c8e85a7f7..2cf1acf0b 100644 --- a/citadel/textclient/routines.c +++ b/citadel/textclient/routines.c @@ -57,8 +57,8 @@ struct utmp *getutline(struct utmp *ut); #include "citadel_decls.h" #include "routines2.h" -#define IFAIDE if(axlevel>=6) -#define IFNAIDE if (axlevel<6) +#define IFAIDE if(axlevel>=AxAideU) +#define IFNAIDE if (axlevelaxlevel = 0; + user->axlevel = AxDeleted; } r = CtdlIPCAideSetUserParameters(ipc, user, buf); diff --git a/citadel/user_ops.c b/citadel/user_ops.c index ee9e2ed1e..f95c3bab5 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -378,7 +378,7 @@ void MailboxName(char *buf, size_t n, const struct ctdluser *who, const char *pr */ int is_aide(void) { - if (CC->user.axlevel >= 6) + if (CC->user.axlevel >= AxAideU) return (1); else return (0); @@ -395,7 +395,7 @@ int is_room_aide(void) return (0); } - if ((CC->user.axlevel >= 6) + if ((CC->user.axlevel >= AxAideU) || (CC->room.QRroomaide == CC->user.usernum)) { return (1); } else { @@ -650,7 +650,7 @@ int CtdlLoginExistingUser(char *authname, const char *trythisname) /* Did we find something? */ if (found_user == 0) { - if (((CC->nologin)) && (CC->user.axlevel < 6)) { + if (((CC->nologin)) && (CC->user.axlevel < AxAideU)) { return login_too_many_users; } else { safestrncpy(CC->curr_user, CC->user.fullname, @@ -720,7 +720,7 @@ void do_login(void) * (as specified in setup), automatically assign access level 6. */ if (!strcasecmp(CC->user.fullname, config.c_sysadm)) { - CC->user.axlevel = 6; + CC->user.axlevel = AxAideU; } /* If we're authenticating off the host system, automatically give @@ -728,7 +728,7 @@ void do_login(void) */ if (config.c_auth_mode == AUTHMODE_HOST) { if (CC->user.uid == 0) { - CC->user.axlevel = 6; + CC->user.axlevel = AxAideU; } } @@ -819,7 +819,7 @@ void CtdlUserLogout(void) CCC->logged_in = 0; /* Check to see if the user was deleted whilst logged in and purge them if necessary */ - if ((CCC->user.axlevel == 0) && (CCC->user.usernum)) + if ((CCC->user.axlevel == AxDeleted) && (CCC->user.usernum)) purge_user(CCC->user.fullname); /* Free any output buffers */ @@ -1045,7 +1045,7 @@ int purge_user(char pname[]) */ if (CtdlIsUserLoggedInByNum(usbuf.usernum)) { CtdlLogPrintf(CTDL_WARNING, "User <%s> is logged in; not deleting.\n", pname); - usbuf.axlevel = 0; + usbuf.axlevel = AxDeleted; CtdlPutUser(&usbuf); return (1); } @@ -1669,7 +1669,7 @@ void cmd_gnur(char *argbuf) sizeof(struct ctdluser) : cdbus->len)); cdb_free(cdbus); if ((usbuf.flags & US_NEEDVALID) - && (usbuf.axlevel > 0)) { + && (usbuf.axlevel > AxDeleted)) { cprintf("%d %s\n", MORE_DATA, usbuf.fullname); cdb_close_cursor(CDB_USERS); return; @@ -1703,7 +1703,9 @@ void cmd_vali(char *v_args) extract_token(user, v_args, 0, '|', sizeof user); newax = extract_int(v_args, 1); - if (CtdlAccessCheck(ac_aide)) { + if (CtdlAccessCheck(ac_aide) || + (newax > AxAideU) || + (newax < AxDeleted)) { return; } @@ -1763,8 +1765,8 @@ void ListThisUser(struct ctdluser *usbuf, void *data) return; } - if (usbuf->axlevel > 0) { - if ((CC->user.axlevel >= 6) + if (usbuf->axlevel > AxDeleted) { + if ((CC->user.axlevel >= AxAideU) || ((usbuf->flags & US_UNLISTED) == 0) || ((CC->internal_pgm))) { cprintf("%s|%d|%ld|%ld|%ld|%ld||\n", @@ -1811,7 +1813,7 @@ void cmd_chek(char *argbuf) if ((REGISCALL != 0) && ((CC->user.flags & US_REGIS) == 0)) regis = 1; - if (CC->user.axlevel >= 6) { + if (CC->user.axlevel >= AxAideU) { get_control(); if (CitControl.MMflags & MM_VALID) vali = 1; @@ -1902,8 +1904,8 @@ void cmd_asup(char *cmdbuf) usbuf.posted = extract_int(cmdbuf, 4); if (np > 5) { newax = extract_int(cmdbuf, 5); - if ((newax >= 0) && (newax <= 6)) { - usbuf.axlevel = extract_int(cmdbuf, 5); + if ((newax >= AxDeleted) && (newax <= AxAideU)) { + usbuf.axlevel = newax; } } if (np > 7) { @@ -1913,7 +1915,7 @@ void cmd_asup(char *cmdbuf) usbuf.USuserpurge = extract_int(cmdbuf, 8); } CtdlPutUserLock(&usbuf); - if (usbuf.axlevel == 0) { + if (usbuf.axlevel == AxDeleted) { if (purge_user(requested_user) == 0) { deleted = 1; } diff --git a/citadel/utillib/citadel_ipc.c b/citadel/utillib/citadel_ipc.c index dddda672e..67f6d6991 100644 --- a/citadel/utillib/citadel_ipc.c +++ b/citadel/utillib/citadel_ipc.c @@ -1108,7 +1108,7 @@ int CtdlIPCValidateUser(CtdlIPC *ipc, const char *username, int axlevel, char *c if (!cret) return -2; if (!username) return -2; - if (axlevel < 0 || axlevel > 7) return -2; + if (axlevel < AxDeleted || axlevel > AxAideU) return -2; aaa = (char *)malloc(strlen(username) + 17); if (!aaa) return -1;