]> code.citadel.org Git - citadel.git/blobdiff - citadel/imap_acl.c
Experimental changes to the default theme. Gradient
[citadel.git] / citadel / imap_acl.c
index a9756ba2d6155cca9d661981e189f416516ed1b7..1632532db3675e21f73983dc17a03295fad1b946 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * $Id:  $
+ * $Id$
  *
- * Functions which implement RFC2086/RFC4314 (IMAP ACL extension)
+ * Functions which implement RFC2086 (and maybe RFC4314) (IMAP ACL extension)
  *
  */
 
@@ -37,7 +37,6 @@
 #include "citserver.h"
 #include "support.h"
 #include "config.h"
-#include "serv_extensions.h"
 #include "room_ops.h"
 #include "user_ops.h"
 #include "policy.h"
@@ -81,11 +80,9 @@ void imap_acl_flags(char *rights, int ra)
 {
        strcpy(rights, "");
 
-       /* l - lookup (mailbox is visible to LIST/LSUB commands, SUBSCRIBE mailbox)
-        * r - read (SELECT the mailbox, perform STATUS)
-        * s - keep seen/unseen information across sessions (set or clear \SEEN flag
-        *     via STORE, also set \SEEN during APPEND/COPY/ FETCH BODY[...])
-        * e - perform EXPUNGE and expunge as a part of CLOSE
+       /* l - lookup (mailbox is visible to LIST/LSUB commands)
+        * r - read (SELECT the mailbox, perform STATUS et al)
+        * s - keep seen/unseen information across sessions (STORE SEEN flag)
         */
        if (    (ra & UA_KNOWN)                                 /* known rooms */
           ||   ((ra & UA_GOTOALLOWED) && (ra & UA_ZAPPED))     /* zapped rooms */
@@ -93,28 +90,26 @@ void imap_acl_flags(char *rights, int ra)
                strcat(rights, "l");
                strcat(rights, "r");
                strcat(rights, "s");
-               strcat(rights, "e");
 
                /* Only output the remaining flags if the room is known */
 
-               /* w - write (set or clear arbitrary flags; not supported in Citadel) */
+               /* w - write (set or clear flags other than SEEN or DELETED, not supported in Citadel */
 
                /* i - insert (perform APPEND, COPY into mailbox) */
                /* p - post (send mail to submission address for mailbox - not enforced) */
+               /* c - create (CREATE new sub-mailboxes) */
                if (ra & UA_POSTALLOWED) {
                        strcat(rights, "i");
                        strcat(rights, "p");
+                       strcat(rights, "c");
                }
 
-               /* k - create mailboxes in this hierarchy */
-
-               /* t - delete messages (set/clear \Deleted flag) */
+               /* d - delete messages (STORE DELETED flag, perform EXPUNGE) */
                if (ra & UA_DELETEALLOWED) {
-                       strcat(rights, "t");
+                       strcat(rights, "d");
                }
 
                /* a - administer (perform SETACL/DELETEACL/GETACL/LISTRIGHTS) */
-               /* x - delete mailbox (DELETE mailbox, old mailbox name in RENAME) */
                if (ra & UA_ADMINALLOWED) {
                        /*
                         * This is the correct place to put the "a" flag.  We are leaving
@@ -125,7 +120,6 @@ void imap_acl_flags(char *rights, int ra)
                         * perform them.
                         */
                        /* strcat(rights, "a"); * commented out */
-                       strcat(rights, "x");
                }
        }
 }
@@ -241,7 +235,7 @@ void imap_listrights(int num_parms, char *parms[]) {
                if (valid->num_local == 1) {
                        ret = getuser(&temp, valid->recp_local);
                }
-               free(valid);
+               free_recipients(valid);
        }
        if (ret != 0) {
                cprintf("%s NO Invalid user name or access denied\r\n",