Get accessibility assigned to page

Posted by Community Admin on 04-Aug-2018 15:24

Get accessibility assigned to page

All Replies

Posted by Community Admin on 27-Jul-2011 00:00

HI Team,

Sitefinity version :  4.1 SP2

We are developing one request base access system where if some user doesn't have access on particular page then we are redirecting to NoAccess page. There user will be provided with the message and button to send request to admin for assign him that role require for page.

To get the role assigned to the page we are trying to get the page node  GetPAgeNodes() by passing the page url also tried using pate title but every time it is returning null. Following is code.

PageNode pga = pageManager.GetPageNodes().Where(pD => pD.Title == currentAccessedPage).FirstOrDefault();

We have gone through the existing threads of Sitefinity forum for getting page details.Most of the forum post has same solution.We also tried with fluen API but no luck.

Guide us to get page details.

Regards,

Jesse





Posted by Community Admin on 27-Jul-2011 00:00

Hi Jesse,

Try this:

PageNode node = App.WorkWith().Pages().Where(p => p.Title == currentAccessedPage.Title).Get().FirstOrDefault();
Mind that you will have to include the

Telerik.Sitefinity.Pages.Model
and
Telerik.Sitefinity
namespaces.
Hope that helps.

Greetings,

Svetoslav Petsov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed