Commit 9cf1c454 authored by Mark Harding's avatar Mark Harding

(chore): api/v2/analytics only GET should be restricted not entire endpoint

No related merge requests found
Pipeline #98140045 waiting for manual action with stages
in 7 minutes and 37 seconds
......@@ -7,10 +7,18 @@ use Minds\Core;
use Minds\Core\Di\Di;
use Minds\Interfaces;
class analytics implements Interfaces\Api, Interfaces\ApiAdminPam
class analytics implements Interfaces\Api, Interfaces\ApiIgnorenPam
{
public function get($pages)
{
// Temporary require admin
if (!Core\Session::isAdmin()) {
return Factory::response([
'status' => 'error',
'message' => 'Only admins can view these analytics. Use the dashboards instead.',
]);
}
if (!isset($pages[0])) {
return Factory::response([
'status' => 'error',
......
Please register or to comment