Click or drag to resize
CMSPage.CheckUIElementAccessHierarchical Method (String, String, MacroResolver, Int32, Boolean)
Checks the permissions of all UI elements hierarchically starting with specified UI element. Use optional parameter "contextResolver" and macro in ElementAccessCondition will be also checked. Use optional parameter "rootElementId" if your UI element is in a dialog. RootElementId variable identifies the UI element which is used in the top frame of the dialog. In case of insufficient permissions appropriate redirection is made.

Namespace: CMS.UIControls
Assembly: CMS.UIControls (in CMS.UIControls.dll) Version: 10.0.0
Syntax
C#
public static bool CheckUIElementAccessHierarchical(
	string resourceName,
	string elementName,
	MacroResolver contextResolver = null,
	int rootElementId = 0,
	bool redirectToAccessDenied = true
)

Parameters

resourceName
Type: System.String
Resource name.
elementName
Type: System.String
Starting UI element name.
contextResolver (Optional)
Type: CMS.MacroEngine.MacroResolver
The context resolver for macro in ElementAccessCondition.
rootElementId (Optional)
Type: System.Int32
The root element ID.
redirectToAccessDenied (Optional)
Type: System.Boolean
Indicates whether not fulfillment permissions should cause redirect to access denied

Return Value

Type: Boolean
Returns false if UI current user is not authorized per UI element (requires disabled redirectToAccessDenied parameter)
See Also