FOUR-19583: Cyclical group assignment stops users from being able to login #7769
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[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)
How to Test
Related Tickets & Packages
Code Review Checklist
ci:deploy