Skip to content

Update README.md #8250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 202 commits into
base: pm-apps
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
202 commits
Select commit Hold shift + click to select a range
0aaf004
FOUR-22837
pmPaulis Mar 31, 2025
c058846
Merge pull request #8160 from ProcessMaker/feature/FOUR-22837
pmPaulis Apr 1, 2025
23d0276
Merge branch 'release-2025-spring' of github.com:ProcessMaker/process…
marcoAntonioNina Apr 1, 2025
9f58dda
FOUR-23362:S1: Add in the setting the menu Iframe Whitelist Config
fagubla Apr 1, 2025
0728ebb
Update Model Setting
fagubla Apr 1, 2025
a439060
CR
fagubla Apr 2, 2025
ebcc482
add model in upgrade
fagubla Apr 2, 2025
748bf70
Merge pull request #8163 from ProcessMaker/feature/FOUR-23362
pmPaulis Apr 2, 2025
1ccc682
FOUR-23128
pmPaulis Apr 3, 2025
a05430b
Merge branch 'release-2025-spring' of github.com:ProcessMaker/process…
marcoAntonioNina Apr 4, 2025
2cc444a
Update the key
pmPaulis Apr 4, 2025
55cc3c3
Merge pull request #8171 from ProcessMaker/feature/FOUR-23128
pmPaulis Apr 9, 2025
0f9c605
Merge branch 'release-2025-spring' of github.com:ProcessMaker/process…
marcoAntonioNina Apr 9, 2025
cc89f5a
FOUR-23765
pmPaulis Apr 9, 2025
4f0a260
FOUR-23805
pmPaulis Apr 9, 2025
5241419
Merge pull request #8180 from ProcessMaker/feature/FOUR-23765
pmPaulis Apr 10, 2025
83d5596
solvin obs about remove the else
pmPaulis Apr 10, 2025
252880f
Merge pull request #8181 from ProcessMaker/feature/FOUR-23805
pmPaulis Apr 10, 2025
f5ae585
Add test for updating case started script task status without logging…
caleeli Apr 11, 2025
84ea8de
Implement check to skip non-user tasks in updateTaskStatus method
caleeli Apr 11, 2025
7ba2a0b
change the order for filtering
marcoAntonioNina Apr 14, 2025
028f8a0
fixed the add settings API when changing the settings from a bundle
gustavobascope Apr 14, 2025
042b157
Replicate issue: DOMDocument::loadXML(): Entity 'nbsp' not defined in…
caleeli Apr 16, 2025
d90b087
FOUR-23895
pmPaulis Apr 17, 2025
f3c203b
Add tests for verify process endpoints
caleeli Apr 17, 2025
69562e4
Implement HTML entity replacement for BPMN data in ProcessController
caleeli Apr 17, 2025
c914493
Merge pull request #8197 from ProcessMaker/feature/FOUR-23895
pmPaulis Apr 21, 2025
cf8c4da
Add test file process_with_html.bpmn
caleeli Apr 28, 2025
83c6ed4
ci[veracode]: add DAST scan to dev pushes
ryancooley May 9, 2025
5b962f7
Merge pull request #8228 from ProcessMaker/veracode-dast-essentials
ryancooley May 9, 2025
d144765
ci[veracode]: update to new workflow version
ryancooley May 9, 2025
7199bb9
Merge pull request #8229 from ProcessMaker/veracode-fix
ryancooley May 9, 2025
0f0dba7
FOUR-24286
pmPaulis May 9, 2025
4b0ae2a
FOUR-24286: adding filter contains
pmPaulis May 12, 2025
59c2f8f
Adding the comments about the change
pmPaulis May 13, 2025
2aab4e1
fix(sync-default-templates): handle GitHub fetch failures gracefully …
eiresendez May 16, 2025
c2209f9
add test for skipping failed template fetches and logging warnings
eiresendez May 16, 2025
c14f3e7
Merge pull request #8245 from ProcessMaker/task/FOUR-24430
boliviacoca May 16, 2025
1c718e4
Update README.md
nolanpro May 19, 2025
45d1305
Update cors.php
nolanpro May 19, 2025
ef1bd41
Merge branch 'release-2025-spring' into develop
ryancooley May 21, 2025
9b8f017
Merge pull request #8199 from ProcessMaker/bugfix/FOUR-23865
ryancooley May 21, 2025
9cf93a2
Merge pull request #8233 from ProcessMaker/bugfix/FOUR-24286
ryancooley May 21, 2025
ac89f3c
Merge pull request #8177 from ProcessMaker/epic/FOUR-22580
ryancooley May 21, 2025
78a58a7
Update enterprise packages
ryancooley May 22, 2025
71537c7
Update Nayra
ryancooley May 22, 2025
0f6dfac
Update SSR executor
ryancooley May 22, 2025
fa5c478
Version 4.15.0+beta-1
processmaker-bot May 22, 2025
ee00090
Update enterprise package
ryancooley May 22, 2025
4667293
Version 4.15.0+beta-1
processmaker-bot May 22, 2025
01e7a77
FOUR-13976
pmPaulis May 22, 2025
f83c857
Merge remote-tracking branch 'origin/develop' into bugfix/FOUR-13976-b
pmPaulis May 22, 2025
a831407
FOUR-23828:It is possible to create Site name with blank spaces in IF…
henryjonathanquispe May 22, 2025
a0383b4
FOUR-24545
pmPaulis May 22, 2025
e730c06
FOUR-23828:It is possible to create Site name with blank spaces in IF…
henryjonathanquispe May 22, 2025
bd402ac
Make AI env. variables accessibles to the UI
danloa May 23, 2025
7535e6a
Add ai config for genie timeout
danloa May 23, 2025
fad2e59
Replicate issue FOUR-24548
caleeli May 24, 2025
c16015e
Fix handling of empty non published nested screens
caleeli May 24, 2025
b0587ad
Add console command to clear screens cache
caleeli May 24, 2025
7d47273
Merge remote-tracking branch 'origin/pm-apps' into pm-apps-2
caleeli May 26, 2025
c7db2d3
fix(guided-template): override button width for deep-nested "btn-bx1"…
eiresendez May 27, 2025
2259448
Filter available variable in saved search
danloa May 28, 2025
91cd020
added a fix upgrade to change nullable the encrypted field
gustavobascope May 28, 2025
ba13e1f
Group logic to get variables when savedsearches are used
danloa May 28, 2025
179bfcf
Ensure only admin roles can assign super admins and all permissions
sanjacornelius May 28, 2025
22a734f
Ensure only the super admin toggle is not visible for non admin users
sanjacornelius May 28, 2025
05e2d30
Backend validation to ensure only admin users can update super user p…
sanjacornelius May 28, 2025
9fd594b
Update PLG package
ryancooley May 29, 2025
6792b15
Merge pull request #8261 from ProcessMaker/bugfix/FOUR-23828-A
ryancooley May 29, 2025
a9cc428
Merge pull request #8263 from ProcessMaker/bugfix/FOUR-24545
ryancooley May 29, 2025
d4a578d
Version 4.15.0-RC1
processmaker-bot May 29, 2025
b0911b7
Version 4.15.0
processmaker-bot May 29, 2025
ec27036
Add tests for admin role assignments
sanjacornelius May 29, 2025
a078df7
Validate upload avatar XSS
marcoAntonioNina May 29, 2025
9171123
remove logs
marcoAntonioNina May 29, 2025
6b2baf0
FOUR-24665:IFrame Whitelist recognize others protocol beside https
fagubla May 29, 2025
90ec0af
avoid urls with path
fagubla May 29, 2025
bcff927
FOUR-24577: Threads of cases in parallel are reloaded automatically i…
rodriquelca May 29, 2025
e3eb17d
FOUR-24634 Business Logic Flaw Allows Admin API Token Generation
julceslauhub May 30, 2025
97d0784
add validation URL in modal Edit
fagubla May 30, 2025
63338d9
use mixin
fagubla May 30, 2025
5243474
Merge pull request #8286 from ProcessMaker/sec/FOUR-24635
ryancooley Jun 3, 2025
497a059
Merge pull request #8293 from ProcessMaker/bugfix/FOUR-24634
ryancooley Jun 3, 2025
e18e008
Merge pull request #8287 from ProcessMaker/bugfix/FOUR-24633
ryancooley Jun 3, 2025
5b52eef
update processmaker/docker-executor-php to version 1.4.0
devmiguelangel May 26, 2025
e55c8ca
Merge pull request #8271 from ProcessMaker/FOUR-24570
ryancooley Jun 3, 2025
e9ecddf
Merge pull request #8268 from ProcessMaker/bugfix/FOUR-24259
ryancooley Jun 3, 2025
6b324f1
Merge pull request #8269 from ProcessMaker/bugfix/FOUR-24548
ryancooley Jun 3, 2025
5fe501c
Merge pull request #8193 from ProcessMaker/bugfix/FOUR-13976-b
ryancooley Jun 3, 2025
a019b13
Merge pull request #8191 from ProcessMaker/observation/FOUR-23820
ryancooley Jun 3, 2025
8a692eb
Merge pull request #8281 from ProcessMaker/observation/FOUR-24603
ryancooley Jun 3, 2025
193be33
Merge pull request #8280 from ProcessMaker/bugfix/FOUR-24546
ryancooley Jun 3, 2025
8d31489
Merge pull request #8278 from ProcessMaker/bugfix/FOUR-24616
ryancooley Jun 3, 2025
ec3fd2c
Merge pull request #8187 from ProcessMaker/FOUR-22013
ryancooley Jun 3, 2025
573ea97
Merge pull request #8291 from ProcessMaker/bugfix/FOUR-24577_B
ryancooley Jun 3, 2025
0bc1825
FOUR-24777: Migration error during upgrade
pmPaulis Jun 3, 2025
30b9b09
FOUR-24684 It is possible to set an invalid URL in Iframe white list.
gproly Jun 3, 2025
90a421c
FOUR-24684 Add key white_list_frame.
gproly Jun 3, 2025
fa98dce
Error with the upgrade
pmPaulis Jun 4, 2025
4850889
Merge pull request #8301 from ProcessMaker/bugfix/FOUR-24684
ryancooley Jun 4, 2025
9b08d68
Merge pull request #8288 from ProcessMaker/bugfix/FOUR-24665
ryancooley Jun 4, 2025
d213796
Update modeler & screen-builder
ryancooley Jun 4, 2025
f6b7cb5
Update enterprise packages
ryancooley Jun 4, 2025
fc74409
Version 4.15.1+beta-1
processmaker-bot Jun 4, 2025
3cd04f7
FOUR-23939: Task Section has an empty column
henryjonathanquispe Jun 4, 2025
edf951a
FOUR-23939: Task Section has an empty column
henryjonathanquispe Jun 4, 2025
d6a7aad
FOUR-24522: Create Index to Improve Slow Query on cases_participated
pmPaulis Jun 5, 2025
a8cc370
Merge branch 'develop' of github.com:ProcessMaker/processmaker into b…
marcoAntonioNina Jun 5, 2025
372c956
Merge pull request #8304 from ProcessMaker/bugfix/FOUR-23812
ryancooley Jun 6, 2025
cc775a5
Merge pull request #8303 from ProcessMaker/bugfix/FOUR-24522
ryancooley Jun 6, 2025
0543093
Merge pull request #8299 from ProcessMaker/bugfix/FOUR-24777
ryancooley Jun 6, 2025
e65ccb5
Merge pull request #8302 from ProcessMaker/bugfix/FOUR-23939
ryancooley Jun 6, 2025
7ee1d0c
Update enterprise package
ryancooley Jun 6, 2025
a834a0f
Version 4.15.1+beta-2
processmaker-bot Jun 6, 2025
e2d5c5a
Merge pull request #8306 from ProcessMaker/observation/FOUR-23820
ryancooley Jun 6, 2025
dc78500
Update Enterprise package
ryancooley Jun 6, 2025
f73fb0f
Version 4.15.1+beta-2
processmaker-bot Jun 6, 2025
8d16f8e
Set minimum characters to 2
mcraeteisha Jun 9, 2025
ad88b87
FOUR-23617: When reloading the page, the completed status filter show…
henryjonathanquispe Jun 10, 2025
e9558d2
FOUR-23617: When reloading the page, the completed status filter show…
henryjonathanquispe Jun 10, 2025
b7ae604
FOUR-24946
pmPaulis Jun 11, 2025
0693982
Adding test
pmPaulis Jun 11, 2025
234c501
FOUR-24963: Cases and Tasks are not listed in launchpad when a saved …
henryjonathanquispe Jun 11, 2025
bc3d841
Implement is-admin property
sanjacornelius Jun 11, 2025
aefd9c7
FOUR-23812:The variables are duplicated in Available columns in TASK …
fagubla Jun 11, 2025
a3fcc83
Merge pull request #8314 from ProcessMaker/bugfix/FOUR-23812
ryancooley Jun 12, 2025
3f78ba6
Merge pull request #8309 from ProcessMaker/task/FOUR-24834
ryancooley Jun 12, 2025
b8615eb
Update enterprise packages
ryancooley Jun 12, 2025
4fcfad5
Version 4.15.1-RC1
processmaker-bot Jun 12, 2025
cffa7cf
Remove troubleshooting code
sanjacornelius Jun 12, 2025
2086308
Version 4.15.1
processmaker-bot Jun 12, 2025
49d40b1
FOUR-24986
pmPaulis Jun 13, 2025
0662515
FOUR-23812:The variables are duplicated in Available columns in TASK …
fagubla Jun 13, 2025
3f6eb8e
Merge pull request #8312 from ProcessMaker/feature/FOUR-24946
ryancooley Jun 13, 2025
2492c65
Merge pull request #8318 from ProcessMaker/bugfix/FOUR-24892
ryancooley Jun 13, 2025
cdd6121
Merge pull request #8313 from ProcessMaker/bugfix/FOUR-24963
ryancooley Jun 13, 2025
ac5e35b
Merge pull request #8310 from ProcessMaker/bugfix/FOUR-23617
ryancooley Jun 13, 2025
f3cf601
Update ProcessVariableController.php
fagubla Jun 13, 2025
75a8900
Update JS dependencies
ryancooley Jun 13, 2025
77c4063
Update enterprise package
ryancooley Jun 13, 2025
563f757
Version 4.15.2+beta-1
processmaker-bot Jun 13, 2025
e59b62a
Update some test
pmPaulis Jun 13, 2025
eedac71
Merge pull request #8323 from ProcessMaker/feature/FOUR-24986
pmPaulis Jun 16, 2025
d5814c5
FOUR-25042: The Priority and Draft tab are moved to the Inbox, when y…
henryjonathanquispe Jun 17, 2025
1425d05
Merge pull request #8322 from ProcessMaker/bugfix/FOUR-23812
ryancooley Jun 26, 2025
bfa77fb
Update JS dependencies
ryancooley Jun 26, 2025
987ddc5
Update enterprise packages
ryancooley Jun 26, 2025
eeda9a0
Version 4.15.2-RC1
processmaker-bot Jun 26, 2025
0551239
Version 4.15.2
processmaker-bot Jun 26, 2025
c591801
FOUR-24952 Updated and fixed observations.
gproly Jun 27, 2025
4e65c57
FOUR-24952 Fix missing file.
gproly Jun 27, 2025
1019cb2
FOUR-24952 Fix the missing function.
gproly Jul 1, 2025
88052e8
FOUR-25078 Response time in data connector resources has increased af…
julceslauhub Jul 2, 2025
67b0cf7
FOUR-25161 Implement SIMDJSON for json_encode
gproly Jul 2, 2025
4bc7b66
FOUR-25078 Response time in data connector resources has increased af…
julceslauhub Jul 2, 2025
44e1e89
FOUR-25078 Response time in data connector resources has increased af…
julceslauhub Jul 3, 2025
5f9a5fc
FOUR-25161 Fix observations.
gproly Jul 3, 2025
e8c4b34
FOUR-25161 Fix observations.
gproly Jul 3, 2025
3ed4adf
FOUR-25161 Update documentation
gproly Jul 3, 2025
5257c3f
FOUR-25161 Fix The test documentation is completed.
gproly Jul 3, 2025
a93036b
Add metrics env variables
caleeli Jul 4, 2025
d1d1778
Disable store metrics for settings
caleeli Jul 4, 2025
baf2227
Add scheduled command for clearing metrics with configurable intervals
caleeli Jul 4, 2025
5e9806c
Merge pull request #8338 from ProcessMaker/bugfix/FOUR-25078
nolanpro Jul 7, 2025
2ed8980
Update enterprise packages
nolanpro Jul 7, 2025
4fe5efa
Version 4.15.3+beta-1
processmaker-bot Jul 7, 2025
7493bb5
Using json_decode in task Controller
pmPaulis Jul 7, 2025
fca5d00
Merge remote-tracking branch 'origin/develop' into epic/FOUR-24952
pmPaulis Jul 7, 2025
ab9e7bd
Removing the response_json_optimize
pmPaulis Jul 8, 2025
e64838e
Remove microsoft-graph dependency; Downgrade php-http/promise
sanjacornelius Jul 8, 2025
76600fe
Solving the observations
pmPaulis Jul 8, 2025
7a1427b
Adding notes in the PR
pmPaulis Jul 9, 2025
9e3f64f
solving a unit test
pmPaulis Jul 9, 2025
acc478c
Merge pull request #8341 from ProcessMaker/feature/FOUR-25161
pmPaulis Jul 9, 2025
2f48b46
removing the unused changes
pmPaulis Jul 9, 2025
99d407c
Merge remote-tracking branch 'origin/develop' into FOUR-24338
caleeli Jul 9, 2025
f88588e
Add accesors for Message Events
danloa Jul 9, 2025
fe88ab1
Merge pull request #8355 from ProcessMaker/task/FOUR-25207
danloa Jul 9, 2025
0a19c86
Clean app_name to be used for prometheus_namespace
caleeli Jul 9, 2025
7dcd79d
Version 4.15.3-RC1
processmaker-bot Jul 9, 2025
59c3d85
Remove unused graph import
sanjacornelius Jul 9, 2025
9a91bd2
Revert and prevent composer.lock patch updates
sanjacornelius Jul 9, 2025
38a5232
CR observations, remove the json_optimize_encode
pmPaulis Jul 9, 2025
8e713e2
Solving the Unit test observations
pmPaulis Jul 9, 2025
c225153
Merge pull request #8362 from ProcessMaker/epic/FOUR-24127
danloa Jul 10, 2025
bcad7a8
Version 4.15.3
processmaker-bot Jul 10, 2025
7ae0e3e
Merge branch 'develop' into task/FOUR-25182
sanjacornelius Jul 10, 2025
e5ab719
Merge pull request #8349 from ProcessMaker/FOUR-24338
nolanpro Jul 11, 2025
1b3a206
Merge pull request #8324 from ProcessMaker/epic/FOUR-24952
nolanpro Jul 11, 2025
83d8d93
Merge pull request #8326 from ProcessMaker/bugfix/FOUR-25042
nolanpro Jul 11, 2025
ec6a1c9
Merge pull request #8352 from ProcessMaker/task/FOUR-25182
nolanpro Jul 11, 2025
87a829f
Update dependencies
nolanpro Jul 11, 2025
91e7664
Version 4.15.4
processmaker-bot Jul 11, 2025
d733bf1
Version 4.15.4+beta-1
processmaker-bot Jul 11, 2025
c640e8a
Update dependencies
nolanpro Jul 14, 2025
0ed9df3
Version 4.15.4+beta-1
processmaker-bot Jul 14, 2025
40be56b
Version 4.15.4+beta-1
processmaker-bot Jul 14, 2025
cf3462a
Version 4.15.4+beta-1
processmaker-bot Jul 14, 2025
5943766
Remomve microsoft graph dependency
danloa Jul 14, 2025
70f618d
Merge with develop
danloa Jul 14, 2025
87fc132
Add library
danloa Jul 14, 2025
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
28 changes: 28 additions & 0 deletions .github/workflows/veracode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Veracode DAST Essentials

on:
push:
branches:
- develop
workflow_dispatch:
workflow_call:

jobs:
veracode_security_scan:
runs-on: ubuntu-latest
name: Run Veracode DAST Essentials Scan
steps:
- name: Veracode Action Step
id: Veracode
uses: veracode/[email protected]
with:
VERACODE_WEBHOOK: '${{ secrets.VERACODE_WEBHOOK }}'
VERACODE_SECRET_ID: '${{ secrets.VERACODE_SECRET_ID }}'
VERACODE_SECRET_ID_KEY: '${{ secrets.VERACODE_SECRET_ID_KEY }}'
REGION: 'us'
pull-report: 'true'
- name: Publish Test Report
uses: mikepenz/action-junit-report@v1
with:
report_paths: 'report.xml'
github_token: ${{ secrets.GITHUB_TOKEN }}
7 changes: 6 additions & 1 deletion ProcessMaker/Cache/AbstractCacheFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
abstract class AbstractCacheFactory implements CacheFactoryInterface
{
protected static ?CacheInterface $testInstance = null;
protected static bool $storeMetrics = true;

/**
* Set a test instance for the factory
Expand Down Expand Up @@ -38,7 +39,11 @@ public static function create(CacheManager $cacheManager, CacheMetricsInterface
$cache = static::createInstance($cacheManager);

// Wrap with metrics decorator
return new CacheMetricsDecorator($cache, $metrics);
if (static::$storeMetrics) {
return new CacheMetricsDecorator($cache, $metrics);
}

return $cache;
}

/**
Expand Down
2 changes: 2 additions & 0 deletions ProcessMaker/Cache/Settings/SettingCacheFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

class SettingCacheFactory extends AbstractCacheFactory
{
protected static bool $storeMetrics = false;

/**
* Create the specific settings cache instance
*
Expand Down
33 changes: 33 additions & 0 deletions ProcessMaker/Console/Commands/CacheScreensClear.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace ProcessMaker\Console\Commands;

use Illuminate\Console\Command;
use ProcessMaker\Cache\Screens\ScreenCacheFactory;

class CacheScreensClear extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'cache:screens-clear';

/**
* The console command description.
*
* @var string
*/
protected $description = 'Clear the cache for screens';

/**
* Execute the console command.
*/
public function handle()
{
$screenCache = ScreenCacheFactory::getScreenCache();
$screenCache->clearCompiledAssets();
$this->info('Cache for screens cleared');
}
}
31 changes: 31 additions & 0 deletions ProcessMaker/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,37 @@ protected function schedule(Schedule $schedule)

$schedule->command('cache:metrics --format=json > storage/logs/processmaker-cache-metrics.json')
->daily();

$clearInterval = config('metrics.clear_interval', 10);
switch ((int) $clearInterval) {
case 1:
$schedule->command('metrics:clear')->everyMinute();
break;
case 2:
$schedule->command('metrics:clear')->everyTwoMinutes();
break;
case 5:
$schedule->command('metrics:clear')->everyFiveMinutes();
break;
case 10:
$schedule->command('metrics:clear')->everyTenMinutes();
break;
case 15:
$schedule->command('metrics:clear')->everyFifteenMinutes();
break;
case 30:
$schedule->command('metrics:clear')->everyThirtyMinutes();
break;
case 60:
$schedule->command('metrics:clear')->hourly();
break;
case 1440:
$schedule->command('metrics:clear')->daily();
break;
default:
$schedule->command('metrics:clear')->cron("*/{$clearInterval} * * * *");
break;
}
}

/**
Expand Down
4 changes: 4 additions & 0 deletions ProcessMaker/Console/Migration/ExtendedMigrateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

use Illuminate\Database\Console\Migrations\MigrateCommand as BaseMigrateCommand;
use Illuminate\Support\Facades\Cache;
use ProcessMaker\Cache\Screens\ScreenCacheFactory;
use ProcessMaker\Cache\Settings\SettingCacheFactory;
use ProcessMaker\Helpers\CachedSchema;
use ProcessMaker\Models\ProcessMakerModel;

Expand All @@ -13,6 +15,8 @@ public function handle(): void
{
Cache::tags(ProcessMakerModel::MIGRATION_COLUMNS_CACHE_KEY)->flush();
Cache::tags(CachedSchema::CACHE_TAG)->flush();
SettingCacheFactory::getSettingsCache()->clear();
ScreenCacheFactory::getScreenCache()->clearCompiledAssets();

parent::handle();
}
Expand Down
15 changes: 15 additions & 0 deletions ProcessMaker/Events/MessageEventThrown.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,19 @@ public function broadcastWith(): array
'data' => (object) $this->message->getData($this->processRequest),
];
}

public function getProcessRequest()
{
return $this->processRequest;
}

public function getNode()
{
return $this->node;
}

public function getMessage()
{
return $this->message;
}
}
6 changes: 4 additions & 2 deletions ProcessMaker/Events/ProcessUpdated.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class ProcessUpdated implements ShouldBroadcastNow

private $processRequest;

public $activeTokens;

/**
* Create a new event instance.
*
Expand All @@ -35,7 +37,7 @@ public function __construct(ProcessRequest $processRequest, $event, TokenInterfa
$this->event = $event;

$this->processRequest = $processRequest;

$this->activeTokens = $this->processRequest->getActiveTokens($this->processRequest);
if ($token) {
$this->tokenId = $token->getId();
$this->elementType = $token->element_type;
Expand Down Expand Up @@ -65,7 +67,7 @@ public function broadcastOn()
/**
* Return the process request.
*
* @return \ProcessMaker\Models\ProcessRequest
* @return ProcessRequest
*/
public function getProcessRequest()
{
Expand Down
7 changes: 7 additions & 0 deletions ProcessMaker/Filters/BaseFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ abstract class BaseFilter

public const TYPE_PROCESS_NAME = 'ProcessName';

public const PROCESS_NAME_IN_REQUEST = 'process_request.name';

public const TYPE_RELATIONSHIP = 'Relationship';

public string|null $subjectValue;
Expand Down Expand Up @@ -98,6 +100,11 @@ private function apply($query): void
$this->valueAliasAdapter($valueAliasMethod, $query);
} elseif ($this->subjectType === self::TYPE_PROCESS) {
$this->filterByProcessId($query);
} elseif ($this->subjectValue === self::PROCESS_NAME_IN_REQUEST) {
// For performance reasons, the task list uses the column process_request.name
// But the filters must use the Process table, for this reason the subjectType is updated
$this->subjectType = self::TYPE_PROCESS_NAME;
$this->filterByProcessName($query);
} elseif ($this->subjectType === self::TYPE_PROCESS_NAME) {
$this->filterByProcessName($query);
} elseif ($this->subjectType === self::TYPE_RELATIONSHIP) {
Expand Down
48 changes: 48 additions & 0 deletions ProcessMaker/Helpers/DefaultColumns.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Support\Facades\Auth;
use ProcessMaker\Package\SavedSearch\Http\Controllers\SavedSearchController;
use ProcessMaker\Package\SavedSearch\Models\SavedSearch;
use ProcessMaker\Package\SavedSearch\Traits\HasDataColumns;

class DefaultColumns
{
Expand Down Expand Up @@ -40,4 +41,51 @@ public static function get(string $key)

return $defaultColumns;
}

/**
* Simple verification if columns are default - returns true or false
*
* @param array|null $savedColumns The columns to verify
* @param string $key The key to identify the type can be tasks or requests
* @return bool True if columns have the same fields as defaults, false otherwise
*/
public static function verifyDefaultColumns($savedColumns, string $key): bool
{
// Handle null savedColumns
if ($savedColumns === null || !is_array($savedColumns) || empty($savedColumns)) {
return true;
}

// Determine the type based on the key
$type = null;
if ($key === SavedSearch::KEY_TASKS) {
$type = 'task';
} else {
return true;
}

// Get default columns using the HasDataColumns trait
$defaultColumns = SavedSearch::getDefaultColumns($type);
if ($defaultColumns->isEmpty()) {
return true;
}

// Extract only the 'field' values from default columns
$defaultFields = $defaultColumns->map(function ($column) {
return $column->field ?? null;
})->filter()->sort()->values()->toArray();

// Extract only the 'field' values from saved columns (handling both formats)
$savedFields = collect($savedColumns)->map(function ($column) {
// Handle both object and array formats
if (is_object($column)) {
return $column->field ?? null;
} else {
return $column['field'] ?? null;
}
})->filter()->sort()->values()->toArray();

// Compare only the field arrays
return $defaultFields == $savedFields;
}
}
5 changes: 5 additions & 0 deletions ProcessMaker/Http/Controllers/Admin/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace ProcessMaker\Http\Controllers\Admin;

use Illuminate\Contracts\View\Factory;
use Illuminate\Support\Facades\Auth;
use Illuminate\View\View;
use ProcessMaker\Http\Controllers\Controller;
use ProcessMaker\Models\Group;
Expand Down Expand Up @@ -87,6 +88,9 @@ function ($result, $item) {
$addons = $this->getPluginAddons('edit', compact(['user']));
$addonsSettings = $this->getPluginAddons('edit.settings', compact(['user']));

// The user can only create tokens for themselves or if they are an administrator.
$canCreateTokens = Auth::user()->is_administrator || Auth::user()->id === $user->id;

return view('admin.users.edit', compact(
'user',
'groups',
Expand All @@ -104,6 +108,7 @@ function ($result, $item) {
'addons',
'addonsSettings',
'ssoUser',
'canCreateTokens',
));
}

Expand Down
7 changes: 6 additions & 1 deletion ProcessMaker/Http/Controllers/Api/DevLinkController.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,12 @@ public function addAsset(Request $request, Bundle $bundle)

public function addSettings(Request $request, Bundle $bundle)
{
$bundle->addSettings($request->input('setting'), $request->input('config'), $request->input('type'));
$bundle->addSettings(
$request->input('setting'),
$request->input('config'),
$request->input('type'),
$request->input('replaceIds', false)
);
}

public function addAssetToBundles(Request $request)
Expand Down
11 changes: 9 additions & 2 deletions ProcessMaker/Http/Controllers/Api/PermissionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace ProcessMaker\Http\Controllers\Api;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cache;
use ProcessMaker\Events\PermissionChanged;
use ProcessMaker\Events\PermissionUpdated;
Expand Down Expand Up @@ -87,9 +88,15 @@ public function update(Request $request)
$entity = User::findOrFail($request->input('user_id'));
// Obtain user old Permissions before save
$originalPermissionNames = $entity->permissions()->pluck('name')->toArray();

if ($request->has('is_administrator')) {
$entity->is_administrator = filter_var($request->input('is_administrator'), FILTER_VALIDATE_BOOLEAN);
$isSettingToAdmin = $request->boolean('is_administrator');

if ((!Auth::user()->is_administrator && $entity->is_administrator) ||
($isSettingToAdmin && !Auth::user()->is_administrator)) {
return response()->json(['message' => 'You are not authorized to modify administrator privileges'], 403);
}

$entity->is_administrator = $isSettingToAdmin;
$entity->save();
}
} elseif ($request->input('group_id')) {
Expand Down
13 changes: 12 additions & 1 deletion ProcessMaker/Http/Controllers/Api/ProcessController.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,11 @@ public function store(Request $request)
$processCreated = ProcessCreated::BPMN_CREATION;
}

// Replace html entities with the correct characters
if (isset($data['bpmn'])) {
$data['bpmn'] = BpmnDocument::replaceHtmlEntities($data['bpmn']);
}

if ($schemaErrors = $this->validateBpmn($request)) {
return response(
['message' => __('The bpm definition is not valid'),
Expand Down Expand Up @@ -483,6 +488,11 @@ public function update(Request $request, Process $process)
$request->validate($rules);
$original = $process->getOriginal();

// Replace html entities with the correct characters
if ($request->has('bpmn')) {
$request->merge(['bpmn' => BpmnDocument::replaceHtmlEntities($request->input('bpmn'))]);
}

// bpmn validation
if ($schemaErrors = $this->validateBpmn($request)) {
$warnings = [];
Expand Down Expand Up @@ -600,7 +610,8 @@ public function updateBpmn(Request $request, Process $process)
$process->alternative = $request->input('alternative');
}

$process->bpmn = $request->input('bpmn');
$bpmn = BpmnDocument::replaceHtmlEntities($request->input('bpmn'));
$process->bpmn = $bpmn;
$process->name = $request->input('name');
$process->description = $request->input('description');
$process->saveOrFail();
Expand Down
Loading
Loading