switch (flag) {
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 (!mx_acl_check (ctx, ACL_DELETE))
+ return;
if (bf) {
if (!h->deleted && !ctx->readonly) {
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 (!mx_acl_check (ctx, ACL_SEEN))
+ return;
if (bf) {
if (h->read || h->old) {
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 (!mx_acl_check (ctx, ACL_SEEN))
+ return;
if (bf) {
if (!h->old) {
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 (!mx_acl_check (ctx, ACL_SEEN))
+ return;
if (bf) {
if (!h->read) {
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 (!mx_acl_check (ctx, ACL_WRITE))
+ return;
if (bf) {
if (!h->replied) {
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 (!mx_acl_check (ctx, ACL_WRITE))
+ return;
if (bf) {
if (!h->flagged) {
&& (changed != h->changed || deleted != ctx->deleted
|| tagged != ctx->tagged))
h->searched = 0;
- draw_sidebar (0);
+ sidebar_draw (0);
}
void mutt_tag_set_flag (int flag, int bf)