contents   index   previous   next



Specifying Security

 

The ScriptEase API call jseInterpret() has among its settings jseNewSecurity. If you turn this on, then the script being run will have security applied to it. If you leave it off, no security applies and all functions can be called. The four security items we just finished discussing correspond to the four fields of the jseExternalLinkParameters structure of the same name. Before you interpret the script, you use jseGetExternalLinkParameters() to get the parameters structure, fill in these fields, then call jseInterpret() with the jseNewSecurity flag turned on. You must fill in the jseSecurityInit function. If you do not, the jseNewSecurity flag will be ignored.

 

Since the parameters are jseVariables, you set them to any function you like. You can use jseCreateWrapperFunction() to create a wrapper function to do the security tasks. In the example above, we used script examples. ScriptEase Desktop implements security this way. The three functions are put in a script. You tell ScriptEase Desktop the name of the script using the command line parameter /secure=<security script name>. ScriptEase Desktop interprets that script first, picks out the security functions, and uses them when it interprets the script you are really interested in. The functions in the security script must be given the names we described above.

 

When you interpret a script from within a script, using SElib.interpret(), you can also specify the security for that child script. See the manual description of SElib.interpret() for details on how you do this.

 


Wrapper Functions And Security