Skip to content
Snippets Groups Projects
Commit bd71f100 authored by Pascal Neub's avatar Pascal Neub
Browse files

[Projekt: xRM-Sales][TicketNr.: 1074293][Angebot/Belege - User ohne Adminrolle...

[Projekt: xRM-Sales][TicketNr.: 1074293][Angebot/Belege - User ohne Adminrolle dürfen Angebote oder Belege, die bereits versendet sind, nicht mehr bearbeiten können]
parent 09a1fd23
No related branches found
No related tags found
No related merge requests found
import("system.tools");
import("system.result");
import("system.vars");
import("KeywordRegistry_basic");
// as one field (status) should be editable if status is sent and all other not, it is done by a state process in each field.
// using the grant update would also disable the status field.
\ No newline at end of file
// using the grant update would also disable the status field.
var status = vars.get("$field.STATUS");
var editable = status != $KeywordRegistry.offerStatus$sent()
&& status != $KeywordRegistry.offerStatus$won()
&& status != $KeywordRegistry.offerStatus$lost();
result.string(editable || tools.hasRole(vars.get("$sys.user"), "INTERNAL_ADMINISTRATOR"));
......@@ -4,6 +4,7 @@
<title>Receipt</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/Order_entity/documentation.adoc</documentation>
<grantUpdateProcess>%aditoprj%/entity/Order_entity/grantUpdateProcess.js</grantUpdateProcess>
<grantDeleteProcess>%aditoprj%/entity/Order_entity/grantDeleteProcess.js</grantDeleteProcess>
<contentTitleProcess>%aditoprj%/entity/Order_entity/contentTitleProcess.js</contentTitleProcess>
<contentDescriptionProcess>%aditoprj%/entity/Order_entity/contentDescriptionProcess.js</contentDescriptionProcess>
......
import("system.tools");
import("system.result");
import("system.vars");
var editable = !parseInt(vars.get("$field.ORDERSTATUS"));
result.string(editable || tools.hasRole(vars.get("$sys.user"), "INTERNAL_ADMINISTRATOR"));
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