From 92a0952eee7dc92c71acb9b2c242cf2a6560cb19 Mon Sep 17 00:00:00 2001 From: ajxudir Date: Mon, 8 Jul 2024 14:34:53 +0200 Subject: [PATCH 1/2] DIT-35: Remove daily user deletion job --- app/Console/Kernel.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index fa008678..62c250e0 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -14,8 +14,7 @@ class Kernel extends ConsoleKernel */ protected $commands = [ Commands\StorageLinkCommand::class, - Commands\FetchNsrData::class, - Commands\UserDeletion::class, + Commands\FetchNsrData::class ]; /** @@ -32,8 +31,6 @@ protected function schedule(Schedule $schedule) // be triggered more often than once every hour, or you // want it to be triggered at another minute than :00, // you'll need to update the file /docker-prod/laravel-cron - $schedule->command('kpas:user_deletion --prompts=false') - ->dailyAt('01:00')->runInBackground(); $schedule->command('fetch_from:nsr') ->dailyAt('02:00')->runInBackground(); $schedule->command('fetch_from:canvas') From 1e64211b9dee4398845e69bebe9ab548eaeb4b06 Mon Sep 17 00:00:00 2001 From: ajxudir Date: Mon, 8 Jul 2024 14:41:49 +0200 Subject: [PATCH 2/2] DIT-35: Added canceled_at to console view so admins can make sure the user has not canceled before deleting users --- app/Console/Commands/UserDeletion.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/UserDeletion.php b/app/Console/Commands/UserDeletion.php index e07f3ac9..30616e80 100644 --- a/app/Console/Commands/UserDeletion.php +++ b/app/Console/Commands/UserDeletion.php @@ -73,7 +73,8 @@ public function handle() "ID" => $tokenId, "CanvasID" => $canvasUserData->id, "Email" => $canvasUserData->email, - "ConfirmedAt" => $confirmedDeleteTokensItem->confirmed_at + "CanceledAt" => $confirmedDeleteTokensItem->canceled_at, + "ConfirmedAt" => $confirmedDeleteTokensItem->confirmed_at, ] ); } @@ -82,7 +83,7 @@ public function handle() } } - $headers = ["ID", "CanvasID", "Email", "ConfirmedAt"]; + $headers = ["ID", "CanvasID", "Email", "CanceledAt", "ConfirmedAt"]; $this->table($headers, $usersToDelete); $paramPrompts = $this->option("prompts") == "true";