Skip to content
Snippets Groups Projects
Commit 4b75625c authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

Merge branch '1054493_FixEmployeeRole' into 'master'

1054493 fix employee role

See merge request xrm/basic!196
parents d846262d be2244ee
No related branches found
No related tags found
No related merge requests found
import("system.neon");
import("system.tools");
import("system.vars");
import("system.result");
......@@ -5,11 +6,13 @@ import("system.result");
var userTitle = vars.exists("$param.UserTitle_param") && vars.get("$param.UserTitle_param");
var excludeRolesArray = ["INTERNAL_EVERYONE", "INTERNAL_GROUPWARE", "INTERNAL_SNMP", "INTERNAL_DESIGNER", "INTERNAL_TECHNICAL"];
if (userTitle != "") {
var userRoles = tools.getRoles(userTitle);
for (i = 0; i < userRoles.length; i++) {
excludeRolesArray.push(userRoles[i]);
if(vars.get("$sys.recordstate") != neon.OPERATINGSTATE_NEW)
{
if (userTitle != "") {
var userRoles = tools.getRoles(userTitle);
for (i = 0; i < userRoles.length; i++) {
excludeRolesArray.push(userRoles[i]);
}
}
}
result.string(JSON.stringify(excludeRolesArray));
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment