From 9ccd15a6b10d355109aa015d4ed21cd46294ff32 Mon Sep 17 00:00:00 2001 From: Kegan Maher Date: Tue, 12 Nov 2024 21:59:16 +0000 Subject: [PATCH 1/3] chore(deps): bump GAMADV-XTD3 from 7.00.05 to 7.00.38 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7537122..433e4ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ authors = [ ] requires-python = ">=3.11" dependencies = [ - "advanced-gam-for-google-workspace @ git+https://github.com/taers232c/GAMADV-XTD3.git@v7.00.05#subdirectory=src", + "advanced-gam-for-google-workspace @ git+https://github.com/taers232c/GAMADV-XTD3.git@v7.00.38#subdirectory=src", "pandas==2.2.3", "tzdata", ] From 9704a3ccdf3b628fdac1cc5e9fe574208597709e Mon Sep 17 00:00:00 2001 From: Kegan Maher Date: Tue, 12 Nov 2024 22:03:00 +0000 Subject: [PATCH 2/3] feat(user): reset alumni email signature --- compiler_admin/commands/user/alumni.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/compiler_admin/commands/user/alumni.py b/compiler_admin/commands/user/alumni.py index d1831f1..17d825a 100644 --- a/compiler_admin/commands/user/alumni.py +++ b/compiler_admin/commands/user/alumni.py @@ -4,6 +4,7 @@ from compiler_admin.commands.user.reset import reset from compiler_admin.services.google import ( OU_ALUMNI, + USER_HELLO, CallGAMCommand, move_user_ou, user_account_name, @@ -68,4 +69,22 @@ def alumni(args: Namespace) -> int: command = ("user", account, "turnoff2sv") res += CallGAMCommand(command) + print("Resetting email signature") + # https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Gmail-Send-As-Signature-Vacation#manage-signature + command = ( + "user", + account, + "signature", + f"Compiler LLC
https://compiler.la
{USER_HELLO}", + "replyto", + USER_HELLO, + "default", + "treatasalias", + "false", + "name", + "Compiler LLC", + "primary", + ) + res += CallGAMCommand(command) + return res From ebab1ae4ec8c6234c6211992202afef10d07623c Mon Sep 17 00:00:00 2001 From: Kegan Maher Date: Tue, 12 Nov 2024 22:03:34 +0000 Subject: [PATCH 3/3] feat(user): enable alumni email autoresponder --- compiler_admin/commands/user/alumni.py | 28 +++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/compiler_admin/commands/user/alumni.py b/compiler_admin/commands/user/alumni.py index 17d825a..bfa72d3 100644 --- a/compiler_admin/commands/user/alumni.py +++ b/compiler_admin/commands/user/alumni.py @@ -34,7 +34,7 @@ def alumni(args: Namespace) -> int: return RESULT_FAILURE if getattr(args, "force", False) is False: - cont = input(f"Convert account to alumni for {account}? (Y/n)") + cont = input(f"Convert account to alumni: {account}? (Y/n) ") if not cont.lower().startswith("y"): print("Aborting conversion.") return RESULT_SUCCESS @@ -87,4 +87,30 @@ def alumni(args: Namespace) -> int: ) res += CallGAMCommand(command) + print("Turning on email autoresponder") + # https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Gmail-Send-As-Signature-Vacation#manage-vacation + message = ( + "Thank you for contacting Compiler. This inbox is no longer actively monitored.

" + + f"Please reach out to {USER_HELLO} if you need to get a hold of us." + ) + command = ( + "user", + account, + "vacation", + "true", + "subject", + "[This inbox is no longer active]", + "message", + message, + "contactsonly", + "false", + "domainonly", + "false", + "start", + "Started", + "end", + "2999-12-31", + ) + res += CallGAMCommand(command) + return res