Browse Source

Update Routing.php

Visman 5 years ago
parent
commit
8f63f73fa9
1 changed files with 4 additions and 2 deletions
  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) {