Index: branches/2.4/expressoMail1_2/inc/class.imap_functions.inc.php
===================================================================
--- branches/2.4/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 7050)
+++ branches/2.4/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 7086)
@@ -2149,15 +2149,17 @@
 	            $acl = $this->getacltouser($folder, isset($params['decoded'])); 
 	            /* 
-	             *   l - lookup (mailbox is visible to LIST/LSUB commands) 
-	             *   r - read (SELECT the mailbox, perform CHECK, FETCH, PARTIAL, SEARCH, COPY from mailbox) 
-	             *   s - keep seen/unseen information across sessions (STORE SEEN flag) 
-	             *   w - write (STORE flags other than SEEN and DELETED) 
-	             *   i - insert (perform APPEND, COPY into mailbox) 
-	             *   p - post (send mail to submission address for mailbox, not enforced by IMAP4 itself) 
-	             *   c - create (CREATE new sub-mailboxes in any implementation-defined hierarchy) 
-	             *   d - delete (STORE DELETED flag, perform EXPUNGE) 
-	             *   a - administer (perform SETACL) 
-	                    */ 
-	                    if (strpos($acl, "d") === false){ 
+	             * l - lookup - Mailbox is visible in mailbox list. Mailbox can be subscribed to. 
+	             * r - read - Mailbox can be opened for reading. 
+	             * w - write - Message flags and keywords can be changed, except \Seen and \Deleted 
+	             * s - write-seen - \Seen flag can be changed 
+	             * t - write-deleted - \Deleted flag can be changed 
+	             * i - insert - Messages can be written or copied to the mailbox 
+	             * p - post - Messages can be posted to the mailbox by LDA, e.g. from Sieve scripts 
+	             * e - expunge - Messages can be expunged 
+	             * k - create - Mailboxes can be created (or renamed) directly under this mailbox (but not necessarily under its children, see ACL Inheritance section above) (renaming also requires delete rights) 
+	             * x - delete - Mailbox can be deleted 
+	             * a - admin - Administration rights to the mailbox (currently: ability to change ACLs for mailbox)  
+                 */ 
+	                    if (strpos($acl, "x") === false || strpos($acl, "t") === false || strpos($acl, "e") === false){ 
 	                            $return['status'] = false; 
 	                    } 
@@ -3411,15 +3413,17 @@
         	$acl = $this->getacltouser($folder, isset($params['decoded']));
         	/*
-        	 *   l - lookup (mailbox is visible to LIST/LSUB commands)
-        	 *   r - read (SELECT the mailbox, perform CHECK, FETCH, PARTIAL, SEARCH, COPY from mailbox)
-        	 *   s - keep seen/unseen information across sessions (STORE SEEN flag)
-        	 *   w - write (STORE flags other than SEEN and DELETED)
-        	 *   i - insert (perform APPEND, COPY into mailbox)
-        	 *   p - post (send mail to submission address for mailbox, not enforced by IMAP4 itself)
-        	 *   c - create (CREATE new sub-mailboxes in any implementation-defined hierarchy)
-        	 *   d - delete (STORE DELETED flag, perform EXPUNGE)
-        	 *   a - administer (perform SETACL)
-			*/
-			if (strpos($acl, "d") === false){
+        	 * l - lookup - Mailbox is visible in mailbox list. Mailbox can be subscribed to. 
+             * r - read - Mailbox can be opened for reading. 
+             * w - write - Message flags and keywords can be changed, except \Seen and \Deleted 
+             * s - write-seen - \Seen flag can be changed 
+             * t - write-deleted - \Deleted flag can be changed 
+             * i - insert - Messages can be written or copied to the mailbox 
+             * p - post - Messages can be posted to the mailbox by LDA, e.g. from Sieve scripts 
+             * e - expunge - Messages can be expunged 
+             * k - create - Mailboxes can be created (or renamed) directly under this mailbox (but not necessarily under its children, see ACL Inheritance section above) (renaming also requires delete rights) 
+             * x - delete - Mailbox can be deleted 
+             * a - admin - Administration rights to the mailbox (currently: ability to change ACLs for mailbox)  
+			 */
+			if (strpos($acl, "x") === false || strpos($acl, "t") === false || strpos($acl, "e") === false){ 
 				$return['status'] = false;
 				return $return;
Index: branches/2.4/expressoMail1_2/js/main.js
===================================================================
--- branches/2.4/expressoMail1_2/js/main.js	(revision 7050)
+++ branches/2.4/expressoMail1_2/js/main.js	(revision 7086)
@@ -833,18 +833,16 @@
 					}
 				}
+			if(data.status == false){ 
+                    write_msg(get_lang("You don't have permission for this operation in this shared folder!")); 
+                    return false; 
 			}
 
 		if (show_success_msg){ 
-                if(data.status == false){ 
-                        write_msg(get_lang("You don't have permission for this operation in this shared folder!")); 
-                        return false; 
-                } 
-                else{ 
-                        if (data.msgs_number.length == 1) 
-                                write_msg(get_lang("The message was deleted.")); 
-                        else 
-                                write_msg(get_lang("The messages were deleted.")); 
-                } 
-		}
+                if (data.msgs_number.length == 1) 
+	                    write_msg(get_lang("The message was deleted.")); 
+	            else 
+	                    write_msg(get_lang("The messages were deleted.")); 
+	    }
+	    
 		if (openTab.type[currentTab] > 1){
 			var msg_to_delete = Element(msgs_number);
