summaryrefslogtreecommitdiffstats
path: root/flags.c
diff options
context:
space:
mode:
authorRocco Rutte <pdmef@gmx.net>2006-08-15 17:08:32 +0000
committerRocco Rutte <pdmef@gmx.net>2006-08-15 17:08:32 +0000
commitd4d93763e3c4a82a27b719e1c944adbdc5b91cdb (patch)
treef1ff273cb29540ad999f7abd8c24eacd66795d2d /flags.c
parent7f95a95593348882312665aeea410214339f40ee (diff)
Generic ACL support.
Diffstat (limited to 'flags.c')
-rw-r--r--flags.c48
1 files changed, 12 insertions, 36 deletions
diff --git a/flags.c b/flags.c
index 9e0acc70..6d49c7bd 100644
--- a/flags.c
+++ b/flags.c
@@ -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)
{