ASPX templates
Version 5.x > ASPX templates > ASPX Pages - Menu Item visibility for non-authenticated users View modes: 
User avatar
Member
Member
neil.gittins-hotmail - 6/14/2010 7:37:20 AM
   
ASPX Pages - Menu Item visibility for non-authenticated users
I have set up a very simple test website in Kentico with a few portal pages and a couple of my own ASPX pages which use a master template from the CMS website.

Everything works fine, so then I was experimenting with security in order to hide certain menu items for non-authenticated users. This works OK on the portal pages, but not when I click on my ASPX pages. I have set the menu webpart in CMS to check permissions and have the following permissions set up.

Home - (Portal Page) Public Anonymous User Allow Read
About - (Portal Page) Public Anonymous User Allow Read
Login - (ASPX Page) Public Anonymous User Allow Read
Calendar (ASPX Page) Public Anonymous User Deny Read
CMS - (Portal Page) Public Anonymous User Deny Read

When I first launch the website I see only the Home, About and Login pages which is what I want. But when I click on the Login page the Calendar and CMS menu items become visible too. I have set the cmsmenu webpart up in my ASPX page template (for the Calendar and Login pages) as follows:

<uc1:cmsmenu runat="server" ID="cmsmenu" Visible="true" Path="/%" MaxRelativeLevel="2" SelectOnlyPublished="true" CSSPrefix="horizontal;horizontalsub" Cursor="Pointer" HighlightAllItemsInPath="true" Layout="horizontal" RenderImageAlt="true" Padding="0" Spacing="0" CheckPermissions="true" ClassNames="CMS.MenuItem" />

As you can see, I have the CheckPermissions set "true" to in my template. Is there anything else I need to do so that Kentico will apply the permissions correctly when I view the ASPX pages?

Thanks,

Neil.

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 6/15/2010 1:57:10 AM
   
RE:ASPX Pages - Menu Item visibility for non-authenticated users
Hi Neil,

Do you mean the Calendar and CMS pages are visible when you just open the logon page or after logging in? Could you please let me know what version of Kentico CMS you use and what value you have in 'Settings -> select your site -> Security -> Check page permissions' setting? Thank you in advance.

Best Regards,

Martin Dobsicek

User avatar
Member
Member
neil.gittins-hotmail - 6/15/2010 2:17:59 AM
   
RE:ASPX Pages - Menu Item visibility for non-authenticated users
Hi Martin,

Yes, the Calendar and CMS menu options become visible when I open the login page before logging in.

I am using Kentico v5.5.3789.

The Security settings for my site for Check Page Permissions are "Inherit from global settings" - "Secured Areas".

Thanks for your help.

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 6/20/2010 1:46:13 PM
   
RE:ASPX Pages - Menu Item visibility for non-authenticated users
Hi Neil,

Could you please make sure the pages are set to require authentication or try to set "Check page permissions" setting to "all pages"?

Could you please also make sure your ASPX templates inherits from 'CMS.UIControls.TemplatePage' class?

Best Regards,

Martin Dobsicek