Browse Source

[Web] Fix address rewriting actions, fixes #1829

André 7 năm trước cách đây
mục cha
commit
d00f4744fa

+ 0 - 24
data/web/inc/functions.address_rewriting.inc.php

@@ -287,14 +287,6 @@ function recipient_map($_action, $_data = null, $attr = null) {
   }
   }
   switch ($_action) {
   switch ($_action) {
     case 'add':
     case 'add':
-      if (!isset($_SESSION['acl']['recipient_maps']) || $_SESSION['acl']['recipient_maps'] != "1" ) {
-        $_SESSION['return'][] = array(
-          'type' => 'danger',
-          'log' => array(__FUNCTION__, $_action, $_data, $_attr),
-          'msg' => 'access_denied'
-        );
-        return false;
-      }
       $old_dest = strtolower(trim($_data['recipient_map_old']));
       $old_dest = strtolower(trim($_data['recipient_map_old']));
       if (substr($old_dest, 0, 1) == '@') {
       if (substr($old_dest, 0, 1) == '@') {
         $old_dest = substr($old_dest, 1);
         $old_dest = substr($old_dest, 1);
@@ -359,14 +351,6 @@ function recipient_map($_action, $_data = null, $attr = null) {
       );
       );
     break;
     break;
     case 'edit':
     case 'edit':
-      if (!isset($_SESSION['acl']['recipient_maps']) || $_SESSION['acl']['recipient_maps'] != "1" ) {
-        $_SESSION['return'][] = array(
-          'type' => 'danger',
-          'log' => array(__FUNCTION__, $_action, $_data, $_attr),
-          'msg' => 'access_denied'
-        );
-        return false;
-      }
       $ids = (array)$_data['id'];
       $ids = (array)$_data['id'];
       foreach ($ids as $id) {
       foreach ($ids as $id) {
         $is_now = recipient_map('details', $id);
         $is_now = recipient_map('details', $id);
@@ -482,14 +466,6 @@ function recipient_map($_action, $_data = null, $attr = null) {
       return $mapdata;
       return $mapdata;
     break;
     break;
     case 'delete':
     case 'delete':
-      if (!isset($_SESSION['acl']['recipient_maps']) || $_SESSION['acl']['recipient_maps'] != "1" ) {
-        $_SESSION['return'][] = array(
-          'type' => 'danger',
-          'log' => array(__FUNCTION__, $_action, $_data, $_attr),
-          'msg' => 'access_denied'
-        );
-        return false;
-      }
       $ids = (array)$_data['id'];
       $ids = (array)$_data['id'];
       foreach ($ids as $id) {
       foreach ($ids as $id) {
         if (!is_numeric($id)) {
         if (!is_numeric($id)) {