Expand my Community achievements bar.

Aem 6.4 how to retrict some page access using sling service

Avatar

Level 2

Hi team, how can we restrict some aem site page access .Can anyone suggest plz

 

hi all, thanks for the reply..i wanted to ask that can we retrict the page access for paricular user on publish and author both instance - 

example - suppose end user is accessing our website abc.com where they are accessing a page which we shpuld not show the enduser..any concept we have in aem to do so....i know ocking page but it is for retrict editing for two or more author sametime.

 

second query is  - can we apply clientlib only for specific component is there anypropery by which we can do so as we dont want to apply library on whole page

11 Replies

Avatar

Community Advisor

Could you please explain use case in details? The above description is not clear? Please mentioned where you want to restrict page, Author/Publisher? Who can access those pages? etc.



Arun Patidar

Avatar

Level 2

hi arun, thanks for the reply..i wanted to ask that can we retrict the page access for paricular user on publish and author both instance - 

example - suppose end user is accessing our website abc.com where they are accessing a page which we shpuld not show the enduser..any concept we have in aem to do so....i know ocking page but it is for retrict editing for two or more author sametime.

 

second query is  - can we apply clientlib only for specific component is there anypropery by which we can do so as we dont want to apply library on whole page

Avatar

Level 2

Thanks arun and team,

anycase, sling service also used for this kind of purpose.

Avatar

Community Advisor

You can do it using Sling filters but for that you need to disable the dispatcher caching for those pages so that request can hit publisher and sling filter can validate the access.

But how would you planing to identify the user type/segments? 

 

 



Arun Patidar

Avatar

Level 2
  • Hi Arun; thanks for your reply....I need to check users based on their login and for that I created custom service java where I am using repo and calling login method and check the login user department for end user login.  Is it correct way?? Or can we do this using page property permission tab also??

Avatar

Community Advisor

If you have a login session then you can restrict pages but you have to add users into CUG groups and assign CUG groups to the restricted pages. But do not cache Protected pages.



Arun Patidar

Avatar

Level 10

Hi @ashutot1,

I agree with @arunpatidar that your question lacks details  I'm sorry, I'm sure many people would love to help you, but this is just not enough information to go on. I usually wouldn't answer a question like this but I happen to have already recorded a video for another question which might be useful to you: https://www.youtube.com/watch?v=Pq4kv8MxXUI.

If that doesn't help, please describe what you want to do in much more detail so we can lend you a hand 

Avatar

Level 2

hi  thanks for the reply..i wanted to ask that can we retrict the page access for paricular user on publish and author both instance - 

example - suppose end user is accessing our website abc.com where they are accessing a page which we shpuld not show the enduser..any concept we have in aem to do so....i know ocking page but it is for retrict editing for two or more author sametime.

 

second query is  - can we apply clientlib only for specific component is there anypropery by which we can do so as we dont want to apply library on whole page

Avatar

Community Advisor

Could you please add more details on this?

 

Avatar

Level 2

Hi Ankur, thanks for the reply..i wanted to ask that can we retrict the page access for paricular user on publish and author both instance - 

example - suppose end user is accessing our website abc.com where they are accessing a page which we shpuld not show the enduser..any concept we have in aem to do so....i know ocking page but it is for retrict editing for two or more author sametime.

 

second query is  - can we apply clientlib only for specific component is there anypropery by which we can do so as we dont want to apply library on whole page