Skip to content
Snippets Groups Projects
Commit 756c34fc authored by Simon Leipold's avatar Simon Leipold
Browse files

[Projekt: Entwicklung - Neon][TicketNr.: 1051235][In Custom-Rollen sollen auch...

[Projekt: Entwicklung - Neon][TicketNr.: 1051235][In Custom-Rollen sollen auch Project-Rollen als Childrollen ausgewählt werden können]
parent 9c259792
No related branches found
No related tags found
No related merge requests found
import("system.tools");
import("system.vars");
import("system.db");
import("system.result");
var sqlStr = "select ASYS_ROLES.ROLENAME from ASYS_ROLES";
var roleNames = db.array(db.COLUMN, sqlStr);
var parentRole = vars.get("$param.RoleId_param");
var childRoles = [];
var parentRole = vars.get("$param.RoleId_param");
var allCustomAndProjectRoles = tools.getAllRoles(["CUSTOM", "PROJECT"], true);
for each (let roleName in roleNames) {
if (roleName != parentRole) {
childRoles.push([roleName, roleName]);
for each (let role in allCustomAndProjectRoles) {
if (role[3] != parentRole) {
childRoles.push([role[3], role[3]]);
}
}
result.object(childRoles);
\ No newline at end of file
result.object(childRoles.sort());
\ 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