diff options
author | Rocco Rutte <pdmef@gmx.net> | 2006-08-15 17:08:32 +0000 |
---|---|---|
committer | Rocco Rutte <pdmef@gmx.net> | 2006-08-15 17:08:32 +0000 |
commit | d4d93763e3c4a82a27b719e1c944adbdc5b91cdb (patch) | |
tree | f1ff273cb29540ad999f7abd8c24eacd66795d2d /flags.c | |
parent | 7f95a95593348882312665aeea410214339f40ee (diff) |
Generic ACL support.
Diffstat (limited to 'flags.c')
-rw-r--r-- | flags.c | 48 |
1 files changed, 12 insertions, 36 deletions
@@ -43,12 +43,8 @@ void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx) { case M_DELETE: -#ifdef USE_IMAP - if (ctx && ctx->magic == M_IMAP) - if (mutt_bit_isset (((IMAP_DATA *)ctx->data)->capabilities, ACL) \ - && !mutt_bit_isset(((IMAP_DATA *)ctx->data)->rights,IMAP_ACL_DELETE)) - return; -#endif + if (!mutt_bit_isset(ctx->rights,M_ACL_DELETE)) + return; if (bf) { @@ -94,12 +90,8 @@ void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx) case M_NEW: -#ifdef USE_IMAP - if (ctx && ctx->magic == M_IMAP) - if (mutt_bit_isset (((IMAP_DATA *)ctx->data)->capabilities, ACL) \ - && !mutt_bit_isset(((IMAP_DATA *)ctx->data)->rights,IMAP_ACL_SEEN)) - return; -#endif + if (!mutt_bit_isset(ctx->rights,M_ACL_SEEN)) + return; if (bf) { @@ -129,12 +121,8 @@ void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx) case M_OLD: -#ifdef USE_IMAP - if (ctx && ctx->magic == M_IMAP) - if (mutt_bit_isset (((IMAP_DATA *)ctx->data)->capabilities, ACL) \ - && !mutt_bit_isset(((IMAP_DATA *)ctx->data)->rights,IMAP_ACL_SEEN)) - return; -#endif + if (!mutt_bit_isset(ctx->rights,M_ACL_SEEN)) + return; if (bf) { @@ -159,12 +147,8 @@ void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx) case M_READ: -#ifdef USE_IMAP - if (ctx && ctx->magic == M_IMAP) - if (mutt_bit_isset (((IMAP_DATA *)ctx->data)->capabilities, ACL) \ - && !mutt_bit_isset(((IMAP_DATA *)ctx->data)->rights,IMAP_ACL_SEEN)) - return; -#endif + if (!mutt_bit_isset(ctx->rights,M_ACL_SEEN)) + return; if (bf) { @@ -191,12 +175,8 @@ void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx) case M_REPLIED: -#ifdef USE_IMAP - if (ctx && ctx->magic == M_IMAP) - if (mutt_bit_isset (((IMAP_DATA *)ctx->data)->capabilities, ACL) \ - && !mutt_bit_isset(((IMAP_DATA *)ctx->data)->rights,IMAP_ACL_WRITE)) - return; -#endif + if (!mutt_bit_isset(ctx->rights,M_ACL_WRITE)) + return; if (bf) { @@ -224,12 +204,8 @@ void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx) case M_FLAG: -#ifdef USE_IMAP - if (ctx && ctx->magic == M_IMAP) - if (mutt_bit_isset (((IMAP_DATA *)ctx->data)->capabilities, ACL) \ - && !mutt_bit_isset(((IMAP_DATA *)ctx->data)->rights,IMAP_ACL_WRITE)) - return; -#endif + if (!mutt_bit_isset(ctx->rights,M_ACL_WRITE)) + return; if (bf) { |