diff --git a/ProcessMaker/Providers/AuthServiceProvider.php b/ProcessMaker/Providers/AuthServiceProvider.php index ed40c1ecdf..0d87b7b240 100644 --- a/ProcessMaker/Providers/AuthServiceProvider.php +++ b/ProcessMaker/Providers/AuthServiceProvider.php @@ -158,9 +158,11 @@ private function checkAllowedEndpoints(array $projectIds, string $currentPath): } elseif ($assetType === Screen::class) { $allowedEndpoints[] = "designer/screen-builder/{$assetId}/edit"; $allowedEndpoints[] = "designer/screens/{$assetId}/edit"; + $allowedEndpoints[] = 'designer/screens/preview'; } elseif ($assetType === Script::class) { $allowedEndpoints[] = "designer/scripts/{$assetId}/builder"; $allowedEndpoints[] = "designer/scripts/{$assetId}/edit"; + $allowedEndpoints[] = 'designer/scripts/preview'; } if (class_exists($dataSourceClass) && $assetType === $dataSourceClass) { @@ -168,9 +170,6 @@ private function checkAllowedEndpoints(array $projectIds, string $currentPath): } if (class_exists($decisionTableClass) && $assetType === $decisionTableClass) { $allowedEndpoints[] = "decision-tables/table-builder/{$assetId}/edit"; - $allowedEndpoints[] = 'designer/scripts/' . $assetId . '/builder'; - $allowedEndpoints[] = 'designer/scripts/' . $assetId . '/edit'; - $allowedEndpoints[] = 'designer/scripts/preview'; } }