Developer forum

Forum » CMS - Standard features » List languages/websites with permissions

List languages/websites with permissions

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a situation on a website where I need to create a bunch of new language layers and websites but I need to keep them invisible in the language layer selector until the Content admin manages everything.

What would be the best approach to handle this? Permissions? Is there another way of keeping them  "under the radar"?

I am currently using the API to list them and permissions seem to be ignored.

I am using this: Dynamicweb.Content.AreaService.Repository.GetAreas().Where(x=>x.DomainLock != currentHost)

Thank you,

Adrian


Replies

 
Nicolai Pedersen
Reply

I guess your are in the frontend?

Permissions are handled in the UI nor the API in DW, so that is why you see them all as it is now.

So I guess there is no easy way. We could maybe benefit from a published/not published state for a website - i've been missing that myself from time to time.

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Yeah. I thought somebody might have had this issue before.

It makes sense to have a Published state since most of the time you have to make some adjustments to a new language layer until it can be released to public.

And the Languages loop does not seem to access the properties of the Area ItemType.

In the meantime, I was wondering if there is any front-end method to check if the user has access to a specific areaID or page ID. Something like HasAccess(int areaID).

Thank you,

Adrian

 

 

You must be logged in to post in the forum