GrantPermissionForScript method: PortalRegistry class
Syntax
GrantPermissionForScript(RecordName, FieldName, EventName, FuncName, PermListName, NodeName)
Description
Use the GrantPermissionForScript method to grant the specified permission to the specified iScript. In addition, the specified permission is granted to any component references that point to the specified iScript, and any parent folders.
If you use the string "LOCAL_NODE" as NodeName, the system uses the node name currently defined as local.
All iScript entries in the portal registry are affected for all the portals. Not just the current portal.
Parameters
| Parameter | Description |
|---|---|
|
RecordName |
Specify the record name, as a string, of the record containing the iScript. All iScripts are contained on records whose names start with "WEBLIB". |
|
FieldName |
Specify the name of the field, as a string, containing the iScript. |
|
EventName |
Specify the name of the event, as a string, containing the iScript. Generally iScripts are contained in the FieldFormula event. |
|
FuncName |
Specify the name of the function, as a string, containing the iScript. |
|
PermListName |
Specify the name of the permission list, as a string, that you want to use. |
|
NodeName |
Specify the node of the component reference, as a string, that points to the component reference that you want to grant permissions for. If you use the string "LOCAL_NODE", the system uses the node name currently defined as local. |
Returns
A Boolean value: True if method completed successfully, False otherwise.
Example
&Portal.GrantPermissionForScript("WEBLIB_ALERT", "ALERTCOUNT", "FieldFormula",⇒
"Connect_Alert", "ALLPGS", "Local_Node");