8
« on: December 14, 2020, 12:25:55 pm »
Hi guys,
We use the readOnlyMode to enable users with fewer permissions to update only certain parts of records.
Therefore, we add an update permission (save button) for the role in question and add a call like this to the onAppInitialized event:
if(app.isUserInRole("Administration")){
//alle Rechte
}else if(app.isUserInRole("Sales")){
//darf nur x, y, z editieren
app.readOnlyMode(true, {exclude: [
"x"
,"y"
,"z"
]});
app.setToolbarButtonMode("brixxToolbarSaveRecord", "enabled");
}else{
//keine Rechte
app.readOnlyMode();
}
After the user edited the data and uses the safe button this resets the readOnlyMode for all fields and the user can edit everything.
Could you please fix this issue?
Thanks,
Patrique