Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Aem 6.4 how to retrict some page access using sling service

ashutot1
Level 2
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
Arun_Patidar
Community Advisor
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.

ashutot1
Level 2
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

ashutot1
Level 2
Level 2

Thanks arun and team,

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

Arun_Patidar
Community Advisor
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? 

 

 

ashutot1
Level 2
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??
Arun_Patidar
Community Advisor
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.

Theo_Pendle
Community Advisor
Community Advisor

Hi @ashutot1,

I agree with @Arun_Patidar 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 🙂

ashutot1
Level 2
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

Ankur_Khare
Community Advisor
Community Advisor

Could you please add more details on this?

 

ashutot1
Level 2
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