I have created a custom navigation menu, and I am trying to check permissions to see if the user has access to that document / node in order to be able to hide or display a particular menu item. I have tried many different ways:
CMSContext.CurrentUser.IsAuthorizedPerObject(PermissionsEnum.Read, node,CMSContext.CurrentSiteName)
node.CheckPermissions(PermissionsEnum.Read,CMSContext.CurrentSiteName,CMSContext.CurrentUser)
TreeSecurityProvider.IsAuthorizedPerNode(node, NodePermissionsEnum.Read, CMSContext.CurrentUser) == AuthorizationResultEnum.Allowed
DocumentSecurityHelper.IsAuthorizedPerDocument(node,NodePermissionsEnum.Read,true,CMSContext.CurrentDocumentCulture.CultureCode,CMSContext.CurrentUser)==AuthorizationResultEnum.Allowed
and they all return false.
How do I check to see if the current user has permission to view a node or document front of site?