updated advanced pack to 3.12.0:
Reports:
Non-aggregated columns in Grid report export.
Normalized table mode for 2-dimensional Grid reports.
Ability to create internal reports via the UI.
Ability to show/hide and resize columns in the list report result view.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
* usage to the software or any modified version or derivative work of the software
|
||||
* created by or for you.
|
||||
*
|
||||
* Copyright (C) 2015-2025 EspoCRM, Inc.
|
||||
* Copyright (C) 2015-2026 EspoCRM, Inc.
|
||||
*
|
||||
* License ID: 19bc86a68a7bb01f458cb391d43a9212
|
||||
************************************************************************************/
|
||||
@@ -25,6 +25,7 @@ use Espo\Core\Api\Request;
|
||||
use Espo\Core\Api\Response;
|
||||
use Espo\Core\Api\ResponseComposer;
|
||||
use Espo\Core\Exceptions\BadRequest;
|
||||
use Espo\Core\Exceptions\Error\Body;
|
||||
use Espo\Core\Exceptions\Forbidden;
|
||||
use Espo\Core\Select\Where\Item as WhereItem;
|
||||
use Espo\Core\Utils\Json;
|
||||
@@ -74,6 +75,7 @@ class PostRunGridPreview implements Action
|
||||
|
||||
/**
|
||||
* @throws BadRequest
|
||||
* @throws Forbidden
|
||||
*/
|
||||
private function fetchData(Request $request): stdClass
|
||||
{
|
||||
@@ -83,6 +85,15 @@ class PostRunGridPreview implements Action
|
||||
throw new BadRequest("No data.");
|
||||
}
|
||||
|
||||
$internalClassName = $data->internalClassName ?? null;
|
||||
$isInternal = $data->isInternal ?? false;
|
||||
|
||||
if (($internalClassName !== null || $isInternal) && !$this->user->isAdmin()) {
|
||||
throw Forbidden::createWithBody('onlyAdminCanPreviewInternalReports',
|
||||
Body::create()->withMessageTranslation('onlyAdminCanPreviewInternalReports', Report::ENTITY_TYPE)
|
||||
);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user