Dynamic Script Attribute Mapping
IDaaS supports mapping definitions between platform attributes and application system attributes. This chapter guides you through using JavaScript dynamic scripts as the mapping type for mapping configuration. When writing dynamic scripts, use script code to generate attribute values and set display conditions for the attribute.
Prerequisites
You have administrator permissions for the IDaaS enterprise center platform.
Script Code Rules
Java Class Usage Is Prohibited
For example, the following code is not allowed:
javascript
var File = Java.type('java.io.File'); File;javascript
java.lang.ClassNotFoundException: java.io.Filejavascript
do{}while(true);javascript
ScriptCPUAbuseExceptionjavascript
var o={},i=0; while (true) {o[i++] = 'abc'}javascript
ScriptMemoryAbuseExceptionjavascript
var o={},i=0; while (true) o[i++] = 'abc';javascript
BracesExceptionjavascript
print
echo
quit
exit
readFully
readLine
load
loadWithNewGlobaljavascript
var date =new Date();
date.setDate(date.getDate()+1);
date.toISOString();javascript
user.hobby;javascript
var mobile = user.mobile;
var result = "";
if(mobile.length==11){
result = mobile.slice(0,3)+"****"+mobile.slice(-4);
}
result;javascript
var username = user.userName;
username.toLowerCase()+"@bamboocloud.com";