Hello,
Code of macro:
uuid who;
object zaccess;
send_wait(0,top_object(), "call_attr", "cnt", "current_user_id");
who=msg[0];
send_wait(0, top_object(), "call_attr", "api", "get_access_for_contact", (string)who);
if (msg_error()) {
logf(ERROR, "get_access_for_contact failed %s",msg[0]);
}
else
{
zaccess = msg[0];
logf(SIGNIFICANT, "access: %s",zaccess.sym);
}
if (zaccess.sym=="
Analyst MGR") {
set_return_data(TRUE);
} else {
set_return_data(FALSE);
}
Original Message:
Sent: 12-09-2019 12:11 PM
From: Joel Barger
Subject: Site Defined Condition to Identify User Access Type
I would like to introduce a site defined condition to prevent problems from transitioning to closed without a certain access type being applied to the currently logged in user.
For Example roughly site defined condition:
user.access_type.sym = "Analyst MGR"
How is this accomplished?
Any help is greatly appreciated.
#sitedefinedcondition
#spelcode