diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index bd527f764..89283a7c2 100755 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -34,7 +34,7 @@ class DashboardController extends Controller $counts['license'] = \App\Models\License::assetcount(); $counts['consumable'] = \App\Models\Consumable::count(); $counts['component'] = \App\Models\Component::count(); - $counts['user'] = \App\Models\User::count(); + $counts['user'] = \App\Models\Company::scopeCompanyables(Auth::user())->count(); $counts['grand_total'] = $counts['asset'] + $counts['accessory'] + $counts['license'] + $counts['consumable']; if ((! file_exists(storage_path().'/oauth-private.key')) || (! file_exists(storage_path().'/oauth-public.key'))) { diff --git a/database/migrations/2022_12_20_171851_fix_nullable_migration_for_settings.php b/database/migrations/2022_12_20_171851_fix_nullable_migration_for_settings.php new file mode 100644 index 000000000..aaffd88c4 --- /dev/null +++ b/database/migrations/2022_12_20_171851_fix_nullable_migration_for_settings.php @@ -0,0 +1,30 @@ +string('ldap_default_group')->nullable()->default(null)->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // nothing to do here - this is a hotfix + } +}