From: Vincent Vanwaelscappel Date: Fri, 25 Aug 2023 09:43:47 +0000 (+0200) Subject: wait #6218 @0.75 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=8da7d6b5fb010f8afd80245878ad3f61ccd0db70;p=cubedesigners_userdatabase.git wait #6218 @0.75 --- diff --git a/src/app/Jobs/ApplyPermissionsToUsers.php b/src/app/Jobs/ApplyPermissionsToUsers.php index 7e5bd39..3dc58ec 100644 --- a/src/app/Jobs/ApplyPermissionsToUsers.php +++ b/src/app/Jobs/ApplyPermissionsToUsers.php @@ -17,6 +17,9 @@ class ApplyPermissionsToUsers extends Base implements ShouldBeUnique // Set grade to 0 when null DB::connection('extranet_users')->table('user')->whereNull('e1_grade')->update(['e1_grade' => 0]); + // Set mat as admin of companies that don't have admin + DB::connection('extranet_users')->table('company')->where('admin', '')->update(['admin' => 1]); + $modelType = 'App\\Models\\AuthUser'; // Get Roles names $roles = DB::connection('extranet_users')->table('roles')->get();