]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/vcard/serv_vcard.c
* check_get() clang was indeed right, this ';' is a bug. dict_tcp syntax errors would...
[citadel.git] / citadel / modules / vcard / serv_vcard.c
index ff5c2ab4726a627fad3e81e400a7373f11d439a5..da6418c5783d0243fe9ab3e77e3fcdec04bc7488 100644 (file)
@@ -69,7 +69,6 @@
 #include "config.h"
 #include "control.h"
 #include "user_ops.h"
-#include "policy.h"
 #include "database.h"
 #include "msgbase.h"
 #include "internet_addressing.h"
@@ -324,7 +323,7 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) {
 
 #ifdef VCARD_SAVES_BY_AIDES_ONLY
                /* Prevent non-aides from performing registration changes */
-               if (CC->user.axlevel < 6) {
+               if (CC->user.axlevel < AxAideU) {
                        return(1);
                }
 #endif
@@ -360,7 +359,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 +551,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 +684,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 +747,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;
@@ -1126,7 +1125,7 @@ void check_get(void) {
        CtdlLogPrintf(CTDL_INFO, ": %s\n", cmdbuf);
        while (strlen(cmdbuf) < 3) strcat(cmdbuf, " ");
 
-       if (strcasecmp(cmdbuf, "GET "));
+       if (strcasecmp(cmdbuf, "GET ")==0)
        {
                struct recptypes *rcpt;
                char *argbuf = &cmdbuf[4];