Expand my Community achievements bar.

SOLVED

page restrictions at publish server

Avatar

Level 2

 I want to make very very simple site with some page restriction. For example i want to have a site for photo sharing for example. On the HOME page i have 2 links: Basketball Photos and Soccer photos. Home page can be accessed from all users but Basketball photos can be accessed only from users in basketball_group. Respectively the same for Soccer photos. The scenario: I am hitting the home page - No problem, but when i am trying to open basketball photos the login page will come up and ask me for credentials, if i am a basketball user - i can view the photos but if i am a soccer user then i will have custom Not Authorized page. I have made a closed groups but they don`t make that i am trying to do - When i am logging to author server i am writing my credentials and a basketball link does not appear. I dont know why this does not work at publish server. I will be more than happy if you can give e an information how i can make this.

Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

basically the linkrewriter takes care of removing links to unreachable targets; but you should be able to configure this behaviour (or just overwrite the decision by putting the HTML property 'x-cq-linkchecker="valid"' to the "<a>" tag). But be aware that it's likely that you cannot use the user session anymore to access these pages within Sling or JCR (e.g. reading page titles), because these are hidden behind ACLs. So you need to either render them statically or use a session with elevated privileges, which brings their own problems etc. Or you just

So basically this possible, but a bit tricky to implement; also from a user perspective it might be confusing.

kind regards,
Jörg

View solution in original post

7 Replies

Avatar

Level 10

"I dont know why this does not work at publish server"

It works on Author? 

Avatar

Level 8

Did you replicate the permissions to the publish instance?

Avatar

Administrator

Hi 

Is your setup working on author ?

If yes , then you need to also replicate the permissions to the publish instance.

else please check the permission settings. Please share what exactly you have done to achieve the above stated ?

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

Avatar

Level 2
        On author just hide the restricted pages. But that does not with at publish. But my target is not that. I want when you access a home page all of the links(menu navigation) to be there and then if you want to access a restricted page to get a login page. And if the resource you want to access is restricted - custom you are not authorized page will come up

Avatar

Correct answer by
Employee Advisor

Hi,

basically the linkrewriter takes care of removing links to unreachable targets; but you should be able to configure this behaviour (or just overwrite the decision by putting the HTML property 'x-cq-linkchecker="valid"' to the "<a>" tag). But be aware that it's likely that you cannot use the user session anymore to access these pages within Sling or JCR (e.g. reading page titles), because these are hidden behind ACLs. So you need to either render them statically or use a session with elevated privileges, which brings their own problems etc. Or you just

So basically this possible, but a bit tricky to implement; also from a user perspective it might be confusing.

kind regards,
Jörg

Avatar

Administrator

Hi 

Sorry for the delay response.

Please read this document:- https://docs.adobe.com/docs/en/cq/5-6-1/howto/create_apply_cug.html#Creating The User Group To Be Used

I have tried to achieve what you have asked and i am able to do so:-

Step 1:- Create Group1 and Group2 (Read Rights)

Step 2: Create user1 and user2 (Read Rights)

Step 3: Add user1 to Group1

Step 4: Add user2 to Group2

Step 5: Activate all users and groups (Select the user/Group then right click -> Activate [Activate both users and Groups])

Step 6: Go to:- http://localhost:4502/siteadmin#/content/geometrixx-outdoors/en and then

            a. Go to page properties of Men's page -> Advance Tab -> Closed User Group (Remove all the inheritances [Lock button])-> click Enable button->Add Group1 to Admitted group.

            b. Go to page properties of Women's page -> Advance Tab -> Closed User Group (Remove all the inheritances [Lock button])-> click Enable button->Add Group2 to Admitted group.

In your case this inheritance might not be present.

Step 7:- Publish the pages

Try to see the result in publish instance.

 

My Result:- 

Link:- http://localhost:4503/content/geometrixx-outdoors/en.html (home page)

// Do not required and login.

Link:- http://localhost:4503/content/geometrixx-outdoors/en/men.html (Subpage)

// It redirects me to the login page

 

It is working as you have asked.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni