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

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

(cherry picked from commit e746fb5b)
parent 3343ff91
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