Skip to content

FOUR-19583: Cyclical group assignment stops users from being able to login #7769

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

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

pmPaulis
Copy link
Contributor

Issue & Reproduction Steps

##Steps to Reproduce:

Create two groups (Group A and Group B )
Assign the user you will be logging in with to Group A
Assign Group B as a member of Group A
Assign Group A as a member of Group B
Try to login with the user assigned to Group A
At this point you will see that the user can’t login, and the following screen will be shown (after waiting for a while) or an ERR_CONNECT

Current Behavior:

When there is a cyclical group assignment as the scenario described above, users within Group A can’t login

Expected Behavior:

Admin user has to be alerted (through an alertbox perhaps) that the group trying to be set as a member will cause cyclical assignment between groups.

When adding a group as a member to another group, we need to check if the group being assigned has the father group already there and if the user is part of it.

Solution

  • In this use case the following error is showing: [2024-11-25 17:08:30] dev.ERROR: Allowed memory size of 134217728 bytes exhausted (tried to allocate 364544 bytes) {"userId":13,"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Allowed memory size of 134217728 bytes exhausted (tried to allocate 364544 bytes) at /Users/paulis/Herd/processmaker/ProcessMaker/Traits/HasAuthorization.php:49)
  • I validated the function to avoid the recursive when the group was verified.
  • I added some unit test

How to Test

  • Create a userA assign into the groupA
  • Assigne GroupB to GroupA and also GroupB to GroupA
  • Login with the user A

Related Tickets & Packages

Code Review Checklist

  • I have pulled this code locally and tested it on my instance, along with any associated packages.
  • This code adheres to ProcessMaker Coding Guidelines.
  • This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
  • This solution fixes the bug reported in the original ticket.
  • This solution does not alter the expected output of a component in a way that would break existing Processes.
  • This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
  • This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
  • This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
  • This ticket conforms to the PRD associated with this part of ProcessMaker.
    ci:deploy

@tokensPM
Copy link

QA server K8S was successfully deployed https://ci-2589d41211.engk8s.processmaker.net

@pmPaulis pmPaulis requested a review from caleeli December 2, 2024 14:38
@tokensPM
Copy link

tokensPM commented Dec 2, 2024

QA server K8S was successfully deployed https://ci-2589d41211.engk8s.processmaker.net

@tokensPM
Copy link

tokensPM commented Dec 3, 2024

QA server K8S was successfully deployed https://ci-2589d41211.engk8s.processmaker.net

@pmPaulis pmPaulis added hold Issue is blocked or put on hold no-fix-version PO Backlog Bug and removed hold Issue is blocked or put on hold labels Dec 11, 2024
@pmPaulis pmPaulis changed the base branch from release-2024-fall to release-2025-winter January 23, 2025 16:03
@tokensPM
Copy link

QA server K8S was successfully deployed https://ci-2589d41211.engk8s.processmaker.net

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

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

See analysis details on SonarQube

@ryancooley ryancooley merged commit 29afdc8 into release-2025-winter Jan 30, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants