mirror of
https://github.com/amidaware/tacticalrmm.git
synced 2026-04-26 23:15:57 +03:00
[GH-ISSUE #580] agent.logged_in_user variable not working #2314
Labels
No labels
In Process
bug
bug
dev-triage
documentation
duplicate
enhancement
fixed
good first issue
help wanted
integration
invalid
pull-request
question
requires agent update
security
ui tweak
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tacticalrmm#2314
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @eric-robbins on GitHub (Jun 16, 2021).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/580
Server Info (please complete the following information):
Installation Method:
Agent Info (please complete the following information):
Describe the bug
The agent.logged_in_user variable doesn't work.
To Reproduce
Steps to reproduce the behavior:
Param (
[string]$logged_in_user
)
Write-Host "The logged in user is: $logged_in_user"
The logged in user is: {agent.logged_in_user}
Expected behavior
Should get output of:
The logged in user is: someUserName
Screenshot

Additional context
I have tested with all other agent variables as listed at https://wh1te909.github.io/tacticalrmm/script_variables.html. All other variables work except {{agent.logged_in_user}}. I have made sure to go back and use a copy past method with the agent variable to assure that there is no typo etc.
@wh1te909 commented on GitHub (Jun 16, 2021):
Hi, thanks this is actually a typo in the docs. should be
{{agent.logged_in_username}}just pushed an update to the docsnot all the variables are documented, you can always check the
models.pyfile in each django app to get the full list of available vars (assuming they're not like json fields)github.com/wh1te909/tacticalrmm@99f2772bb3/api/tacticalrmm/agents/models.py (L46)@silversword411 commented on GitHub (Jun 16, 2021):
@wh1te909 Adding my todo list to update all the items in models.py to the docs. Should I skip the #Deprecated ones?
@wh1te909 commented on GitHub (Jun 16, 2021):
@silversword411 awesome ty, yea skip the deprecated ones and also skip any of the
models.JSONFieldsince those won't render properly as strings@silversword411 commented on GitHub (Jun 16, 2021):
....also, if I re-arrange all those items (under
class Agent(BaseAuditModel):) into alphabetic order it's not going to break anything is it? eg@wh1te909 commented on GitHub (Jun 16, 2021):
best to leave it as is, cuz changing stuff in the models will trigger a database migration which should only happen if we add or delete new db fields