Changeset 8067


Ignore:
Timestamp:
04/01/13 17:26:53 (11 years ago)
Author:
thiago
Message:

Ticket #3409 - Feito uma validacao para envio de msg do archive para compartilhada.

Location:
trunk/expressoMail1_2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r8063 r8067  
    35653565        } 
    35663566 
     3567    function verifyShareFolder($params){ 
     3568        $folder = $params['folder']; 
     3569 
     3570         if (substr($folder,0,4) == 'user'){ 
     3571            $acl = $this->getacltouser($folder, isset($params['decoded'])); 
     3572 
     3573            $acl_share_delete = (stripos($acl,'t') !== false && stripos($acl,'e') !== false); 
     3574 
     3575            if (!$acl_share_delete) { 
     3576                $return['status'] = false; 
     3577                return $return; 
     3578            } 
     3579        } 
     3580    } 
    35673581        function move_messages($params) 
    35683582        { 
  • trunk/expressoMail1_2/js/mail_archiver.js

    r8063 r8067  
    756756MailArchiver.prototype.unarchieve = function (folder, new_folder, msgs_number){ 
    757757    try{  
     758 
     759        var aclShare = false; 
     760        $.ajax({ 
     761              url: 'controller.php?' + $.param( { action: '$this.imap_functions.verifyShareFolder', folder: new_folder } ), 
     762              success: function( data ){ 
     763                 data = connector.unserialize( data ); 
     764                 if(data != null){ 
     765                     if(!data.status){ 
     766                        aclShare = true; 
     767                     } 
     768                 } 
     769 
     770              }, 
     771              async: false 
     772        }); 
     773 
     774        if(aclShare){ 
     775            write_msg(get_lang("You don't have permission for this operation in this shared folder!")); 
     776            return false; 
     777        }  
     778 
    758779        write_msg(get_lang("Starting to unarchive messages")); 
    759780        expresso_mail_archive.isArchiveOperation = true; 
Note: See TracChangeset for help on using the changeset viewer.