There is a new validator introduced that checks on object update (assets, users, etc.) if the company matches the locations company.
In case of the creation of a new location it must be checked that the parent matches the own company.
On updating a location a check for every related object must be made to see if the company matches the location.
Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
Before activating scoped location all locations and their related objects will be checked.
If there are locations with different companies than the related objects error out.
Because this operation is quite slow, bail out on the first inconsistent entry.
There is a new artisan command introduced that checks every location.
Depending on the size of the database, this will take very long.
Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>