Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion compiler_admin/commands/user/alumni.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -33,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
Expand Down Expand Up @@ -68,4 +69,48 @@ 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<br />https://compiler.la<br />{USER_HELLO}",
"replyto",
USER_HELLO,
"default",
"treatasalias",
"false",
"name",
"Compiler LLC",
"primary",
)
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.<br /><br />"
+ 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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ authors = [
]
requires-python = ">=3.11"
dependencies = [
"advanced-gam-for-google-workspace @ git+https://github.com/taers232c/[email protected].05#subdirectory=src",
"advanced-gam-for-google-workspace @ git+https://github.com/taers232c/[email protected].38#subdirectory=src",
"pandas==2.2.3",
"tzdata",
]
Expand Down
Loading