diff --git a/app/Http/Requests/Report/GenericReportRequest.php b/app/Http/Requests/Report/GenericReportRequest.php index 03663c5df946..1ebd60dc4321 100644 --- a/app/Http/Requests/Report/GenericReportRequest.php +++ b/app/Http/Requests/Report/GenericReportRequest.php @@ -27,7 +27,6 @@ class GenericReportRequest extends Request public function authorize(): bool { return true; - // return $this->checkAuthority(); } public function rules() @@ -83,22 +82,11 @@ class GenericReportRequest extends Request private function checkAuthority() { - $this->error_message = ctrans('texts.authorization_failure'); /** @var \App\Models\User $user */ $user = auth()->user(); - - if(Ninja::isHosted() && $user->account->isFreeHostedClient()){ - $this->error_message = ctrans('texts.upgrade_to_view_reports'); - return false; - } - + return $user->isAdmin() || $user->hasPermission('view_reports'); } - - protected function failedAuthorization() - { - throw new AuthorizationException($this->error_message); - } } diff --git a/tests/ci b/tests/ci index 3c097b868a6b..e615230bf1ba 100755 --- a/tests/ci +++ b/tests/ci @@ -28,8 +28,8 @@ $tests = \Illuminate\Support\Str::of($process->getOutput()) )) ->filter(fn (string $test) => !empty($test)) // Make sure there are no empty lines ->unique() // We only need unique classes - ->split((int) getenv('CI_NODE_TOTAL')) // Split it into equally sized chunks - ->get((int) getenv('CI_NODE_INDEX')); // Get the index we need for this instance + ->split((int) getenv('CI_NODE_TOTAL',1)) // Split it into equally sized chunks + ->get((int) getenv('CI_NODE_INDEX',1)); // Get the index we need for this instance /** * Run phpunit with a filter: