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

Merge branch '1045205-Fix-Roleallocation' into '2020.0'

#1045205 - Fixed multiple role allocation of one and the same role to one user.

See merge request xrm/basic!117
parents 94a50d96 e746fb5b
No related branches found
No related tags found
No related merge requests found
import("system.tools");
import("system.vars");
import("system.result");
result.string(JSON.stringify(["INTERNAL_EVERYONE", "INTERNAL_GROUPWARE", "INTERNAL_SNMP", "INTERNAL_DESIGNER", "INTERNAL_TECHNICAL"]));
\ No newline at end of file
var userTitle = vars.exists("$param.UserTitle_param") && vars.get("$param.UserTitle_param");
var excludeRolesArray = ["INTERNAL_EVERYONE", "INTERNAL_GROUPWARE", "INTERNAL_SNMP", "INTERNAL_DESIGNER", "INTERNAL_TECHNICAL"];
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