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

Validation rules to prevent switching user companies if items are assigned to them #15415

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

snipe
Copy link
Owner

@snipe snipe commented Aug 29, 2024

This is a hopefully better option for #15414, where we check to see that the user does not have items assigned before moving them to another company if FMCS is enabled.

Corrects a defect created in #15284

Copy link

what-the-diff bot commented Aug 29, 2024

PR Summary

  • Validation Rule Addition to SaveUserRequest.php
    We've included a new check named App\Rules\UserCannotSwitchCompaniesIfItemsAssigned in the SaveUserRequest.php file. This is important to verify a certain condition before a user changes companies.

  • New Validation Rule in UserCannotSwitchCompaniesIfItemsAssigned.php
    We've created a new rule in a file UserCannotSwitchCompaniesIfItemsAssigned.php, located in the app/Rules directory. This rule named UserCannotSwitchCompaniesIfItemsAssigned is designed to ensure a user cannot switch companies if they have any items currently assigned to them. This, in turn, secures that these items won't be lost or incorrectly re-assigned during the switching process.

@snipe snipe changed the title Validation rules to prevent switchng user companies if assets are ass… Validation rules to prevent switching user companies if items are assigned to them Aug 29, 2024
@snipe snipe merged commit 964e105 into develop Aug 29, 2024
8 of 9 checks passed
@snipe snipe deleted the rules/prevent_company_switch branch August 29, 2024 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant