Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ OPEN_AI_SECRET="sk-O2D..."
AI_MICROSERVICE_HOST="http://localhost:8010"
PROCESS_REQUEST_ERRORS_RATE_LIMIT=1
PROCESS_REQUEST_ERRORS_RATE_LIMIT_DURATION=86400
CUSTOM_EXECUTORS=false
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ class ScriptExecutorController extends Controller
{
public function index(Request $request)
{
if (!config('app.custom_executors')) {
abort(404);
}

return view('admin.script-executors.index');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ public function delete(Request $request, ScriptExecutor $scriptExecutor)

private function checkAuth($request)
{
if (!config('app.custom_executors')) {
abort(404);
}

if (!$request->user()->is_administrator) {
throw new AuthorizationException();
}
Expand Down
10 changes: 6 additions & 4 deletions ProcessMaker/Http/Middleware/GenerateMenus.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,12 @@ public function handle(Request $request, Closure $next)
'icon' => 'fa-infinity',
]);

$submenu->add(__('Script Executors'), [
'route' => 'script-executors.index',
'icon' => 'fa-code',
]);
if (config('app.custom_executors')) {
$submenu->add(__('Script Executors'), [
'route' => 'script-executors.index',
'icon' => 'fa-code',
]);
}

$devlinkIcon = base64_encode(file_get_contents(base_path('resources/img/devlink.svg')));
$submenu->add(__('DevLink'), [
Expand Down
4 changes: 3 additions & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
// Process Request security log rate limit: 1 per day (86400 seconds)
'process_request_errors_rate_limit' => env('PROCESS_REQUEST_ERRORS_RATE_LIMIT', 1),
'process_request_errors_rate_limit_duration' => env('PROCESS_REQUEST_ERRORS_RATE_LIMIT_DURATION', 86400),

'default_colors' => [
'primary' => '#2773F3',
'secondary' => '#728092',
Expand All @@ -266,4 +266,6 @@
'vault_token' => env('ENCRYPTED_DATA_VAULT_TOKEN', ''),
'vault_transit_key' => env('ENCRYPTED_DATA_VAULT_TRANSIT_KEY', ''),
],

'custom_executors' => env('CUSTOM_EXECUTORS', false),
];