mirror of
https://github.com/snipe/snipe-it.git
synced 2026-03-30 04:14:17 +00:00
Add a manager field to locations.
This is round one of the rethink of checkout-to-everything. A location now has a manager field, and the manager (by default) be responsible for assets checked out to the location.
This commit is contained in:
@ -376,7 +376,6 @@ class UsersController extends Controller
|
||||
}
|
||||
|
||||
if ($user->licenses()->count() > 0) {
|
||||
|
||||
// Redirect to the user management page
|
||||
return redirect()->route('users.index')->with('error', 'This user still has ' . $user->licenses()->count() . ' licenses associated with them.');
|
||||
}
|
||||
@ -386,6 +385,11 @@ class UsersController extends Controller
|
||||
return redirect()->route('users.index')->with('error', 'This user still has ' . $user->accessories()->count() . ' accessories associated with them.');
|
||||
}
|
||||
|
||||
if ($user->managedLocations()->count() > 0) {
|
||||
// Redirect to the user management page
|
||||
return redirect()->route('users.index')->with('error', 'This user still has ' . $user->managedLocations()->count() . ' locations that they manage.');
|
||||
}
|
||||
|
||||
// Delete the user
|
||||
$user->delete();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user