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

Permissions - bug fix updating roles and role name can not be updated anymore

parent 43635ff5
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@
<name>ROLENAME</name>
<title>Name</title>
<mandatory v="true" />
<stateProcess>%aditoprj%/entity/Role_entity/entityfields/rolename/stateProcess.js</stateProcess>
</entityField>
<entityField>
<name>USERCOUNT</name>
......
import("system.result");
import("system.vars");
import("system.neon");
if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_EDIT) {
result.string(neon.COMPONENTSTATE_READONLY);
} else {
result.string(neon.COMPONENTSTATE_AUTO);
}
\ No newline at end of file
import("system.tools");
import("system.vars");
var name = vars.get("$field.ROLENAME"); // field got prefix "CUSTOM_" already
tools.updateRole(name, vars.get("$field.ROLETITLE"), vars.get("$field.ROLEDESCRIPTION"), true, null);
\ No newline at end of file
var selectedRole = vars.get("$field.ROLENAME"); // field got prefix "CUSTOM_" already
tools.updateRole(selectedRole,
vars.get("$field.ROLETITLE"),
vars.get("$field.ROLEDESCRIPTION"),
vars.get("$field.IS_ASSIGNABLE") == "0" ? false : true,
null
);
\ 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