skmMenu: An ASP.NET Menu Control

Menu.UserHasPermission Method 

Determines if a user belongs to a role for a particular MenuItem.

protected virtual bool UserHasPermission(
   MenuItem mi
);

Parameters

mi
The MenuItem to check.

Return Value

true if the user has the right permissions to view this MenuItem; false otherwise.

Remarks

UserHasPermission() works by returning true if there are no roles defined for mi or if there is at least one role defined for the user and the mi role collection and user role collection are not disjoint.

See Also

Menu Class | skmMenu Namespace