Developer forum

Forum » CMS - Standard features » GetPageIdByNavigationTag and permissions

GetPageIdByNavigationTag and permissions

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

This is a generic question related to permissions.

When a page is not allowed for the current user, will GetPageIdByNavigationTag still return the PageID?

Thank you,

Adrian


Replies

 
Nicolai Pedersen
Reply

Yes.

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Thank you for the answer.

Is there any other method I can use that would return 0 if the current user does not have access to that page?

Thank you,

Adrian

 
Nicolai Pedersen
Reply

Nope. The api it self does not handle permissions - that happens in pageview.

You can check it though, by getting the page instance from the page service and check permissions:

Dynamicweb.Frontend.SecurityHandler.IsCurrentUserAllowed(Page)

 

You must be logged in to post in the forum