GrantPermissionForComponent method: PortalRegistry class
Syntax
GrantPermissionForComponent(MenuName, ComponentName, Market, PermListName, NodeName)
Description
Use the GrantPermissionForComponent method to grant the specified permission and cascaded upwards on parent folders to the specified component. In addition, the specified permission is granted to any component references that point to the specified component, and any parent folders.
Components that have query strings are also searched and permissions are applied on them.
If you use the string "LOCAL_NODE" as NodeName, the system uses the node name currently defined as local.
All component entries in the portal registry are affected for all the portals. Not just the current portal.
Parameters
| Parameter | Description |
|---|---|
|
MenuName |
Specify the menu name, as a string, that the component you want to grant permissions for is associated with. |
|
ComponentName |
Specify the component name, as a string, that you want to grant permissions for. |
|
Market |
Specify the market, as a string, associated with the component that you want to grant permissions for. |
|
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
The My Profile Component Reference points to the USERMAINT_SELF component. Using the following example, "ALLPANLS" permission is granted to the MY_PROFILE component reference, as well as "MY INFO", the parent folder.
&Portal.GrantPermissionForComponent("MAINTAIN_SECURITY", "USERMAINT_SELF", "GBL",⇒
"ALLPANLS", "LOCAL_NODE");