Explorar el Código

Update Routing.php

Visman hace 5 años
padre
commit
8f63f73fa9
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4 2
      app/Controllers/Routing.php

+ 4 - 2
app/Controllers/Routing.php

@@ -154,8 +154,10 @@ class Routing
                 $r->add(self::GET, '/admin/bans/delete/{id:[1-9]\d*}/{token}[/{uid:[2-9]|[1-9]\d+}]', 'AdminBans:delete', 'AdminBansDelete');
             }
 
-            $r->add(self::GET, '/admin/reports',                           'AdminReports:view', 'AdminReports');
-            $r->add(self::GET, '/admin/reports/zap/{id:[1-9]\d*}/{token}', 'AdminReports:zap',  'AdminReportsZap');
+            if ($user->isAdmin || $config->o_report_method == '0' || $config->o_report_method == '2') {
+                $r->add(self::GET, '/admin/reports',                           'AdminReports:view', 'AdminReports');
+                $r->add(self::GET, '/admin/reports/zap/{id:[1-9]\d*}/{token}', 'AdminReports:zap',  'AdminReportsZap');
+            }
         }
         // только админ
         if ($user->isAdmin) {