Skip to content

Conversation

@gproly
Copy link
Contributor

@gproly gproly commented Dec 24, 2025

… user list

Description

When Assignment type=process variable and variable Name (groups) is set with a correct value then when reassign button is pressed, only the process manager is listed.

Related tickets

https://processmaker.atlassian.net/browse/FOUR-28520


Note

Addresses incomplete reassign lists by moving user lookup to a single API and wiring components to it.

  • Centralizes getReassignUsers in tasks/api to POST users_task_count with form_data (sanitized), assignable_for_task_id, optional filter, and excludes currentTaskUserId from results
  • Refactors UI mixins/components (reassignMixin, TaskPreviewAssignment) to use the new API, pass formData and currentTaskUserId, debounce search, and add error handling
  • Enhances reassignment action to optionally create a comment before updating the assignee via updateReassignUser
  • Plumbs props from TasksPreview into TaskPreviewAssignment; simplifies toggle behavior
  • Routes: updates api.php to register GET/POST users_task_count without the previous middleware guards

Written by Cursor Bugbot for commit 4568f9a. This will update automatically on new commits. Configure here.

… user list

 ## Description
When Assignment type=process variable and variable Name (groups) is set with a correct value then when reassign button is pressed, only the process manager is listed.
 ## Related tickets
https://processmaker.atlassian.net/browse/FOUR-28520
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Route::post('users_task_count', [UserController::class, 'getUsersTaskCount'])->name('users.users_task_count_post')
->middleware('can:view-users');
Route::get('users_task_count', [UserController::class, 'getUsersTaskCount'])->name('users.users_task_count');
Route::post('users_task_count', [UserController::class, 'getUsersTaskCount'])->name('users.users_task_count_post');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed authorization allows any user to enumerate all users

The can:view-users middleware was removed from both GET and POST routes for users_task_count. The controller method getUsersTaskCount has no internal authorization check, so any authenticated user can now enumerate all active users in the system along with their usernames, names, and task counts. Without the assignable_for_task_id parameter, the endpoint returns all users, enabling information disclosure. Consider adding a more targeted permission check that validates the user's ability to reassign the specific task rather than removing authorization entirely.

Fix in Cursor Fix in Web

@processmaker-sonarqube
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants