only Manual is supported in insecure mode

This commit is contained in:
wh1te909 2023-08-29 20:33:58 +00:00
parent 09d184e2f8
commit 9c797162f4
1 changed files with 8 additions and 0 deletions

View File

@ -570,6 +570,14 @@ def install_agent(request):
from agents.utils import get_agent_url
from core.utils import token_is_valid
if getattr(settings, "TRMM_INSECURE", False) and request.data["installMethod"] in {
"exe",
"powershell",
}:
return notify_error(
"Not available in insecure mode. Please use the 'Manual' method."
)
# TODO rework this ghetto validation hack
# https://github.com/amidaware/tacticalrmm/issues/1461
try: