Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Task: Create a sitemap using razor that only shows the pages the current user is allowed to access.
I have found and use the Razor Sitemap. I have studied many ASP.NET pages on System.Web.Security.
Is there an Umbraco function like "IsAccessibleToUser( currentUser, pageNode )" (that is written about in MSDN for dotNET security)?
related topic: (but the answer is in XSL)
http://our.umbraco.org/forum/core/general/7103-Security-Trimming
http://our.umbraco.org/forum/developers/extending-umbraco/5977-Sitemap-public-access
Hi Bruce,
Based on XmlSitemap and the Razor DynamicNode Cheat Sheet, I guess you could do something like this:
if(item.IsProtected()) { return; }
just below line 83 (look for if (!item.Visible) { return; }
Cheers,
J
I guess you could also use Cultiv Search Engine Sitemap and modify it as you need.
item.HasAccess() showed if the current user has access to the item {page}.
I wrapped the list item in an if(item.HasAccess()) { ... }
I plan on posting the code after I clean it up.
Thx,
Bruce
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Razor Sitemap showing accessible pages only
Task: Create a sitemap using razor that only shows the pages the current user is allowed to access.
I have found and use the Razor Sitemap. I have studied many ASP.NET pages on System.Web.Security.
Is there an Umbraco function like "IsAccessibleToUser( currentUser, pageNode )" (that is written about in MSDN for dotNET security)?
related topic: (but the answer is in XSL)
http://our.umbraco.org/forum/core/general/7103-Security-Trimming
http://our.umbraco.org/forum/developers/extending-umbraco/5977-Sitemap-public-access
Hi Bruce,
Based on XmlSitemap and the Razor DynamicNode Cheat Sheet, I guess you could do something like this:
just below line 83 (look for if (!item.Visible) { return; }
Cheers,
J
I guess you could also use Cultiv Search Engine Sitemap and modify it as you need.
J
item.HasAccess() showed if the current user has access to the item {page}.
I wrapped the list item in an if(item.HasAccess()) { ... }
I plan on posting the code after I clean it up.
Thx,
Bruce
is working on a reply...