Skip to content
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

Fix #10491 - Display error message when importing user that it reports to itself #10492

Open
wants to merge 1 commit into
base: hotfix
Choose a base branch
from

Conversation

SinergiaCRM
Copy link
Contributor

@SinergiaCRM SinergiaCRM commented Aug 5, 2024

Description

This PR checks that a user is not validating themselves or any other user(s) who end up reporting to them, so that a loop is not created in the chain of reporters.

How To Test This

  1. Create a normal user who reports to himself.
  2. Export the user and in the downloaded document change the name of the user and the ID of the user to whom he reports ("Reports to" column), where we will indicate the ID of the user himself
  3. Run the Import and Update process and check that error message is displayed and the user is not updated.

(Optional)
5. Create another user who reports to the first
6. Export both users and modify the first user so that it reports to this second user.
7. Run the Import and Update process and check that error message is displayed and the user is not updated.

(+Optional)
8. Extend the chain of reporters and perform the checks.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

@serhiisamko091184 serhiisamko091184 added Status: Requires Code Review Needs the core team to code review Status:Assessed PRs that have been tested and confirmed to resolve an issue by a core team member Branch:Hotfix PR 4-8 Score given to PRs once assessed Area:Users Issues & PRs related to all things regarding to Users labels Aug 6, 2024
@serhiisamko091184
Copy link
Contributor

Thanks for the PR, @SinergiaCRM!

Regards,
Serhii

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:Users Issues & PRs related to all things regarding to Users Branch:Hotfix PR 4-8 Score given to PRs once assessed Status:Assessed PRs that have been tested and confirmed to resolve an issue by a core team member Status: Requires Code Review Needs the core team to code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants