1

I have requirement i.e. I have some protected languages like de-DE (German), when user browsing these language ex: http://www.xyz.com/de-DE then he must redirect to login page.

Could you please let me know where to which is best pipeline to add this code. I am trying to add the code using Sitecore.Pipelines.RenderLayout.SecurityCheck.

2 Answers 2

2

You should check the language as soon as possible - so I would do it in the HTTPRequestBegin pipeline at the languageResolver.

<processor type="Sitecore.Pipelines.HttpRequest.LanguageResolver, Sitecore.Kernel" />

This is depending on what action your site should take, offcourse. But it sounds like, it should change to a different language.

0

If you define a different website for the German language (targeting the same content tree of course) then you can secure it easily through configuration and let Sitecore worry about anything further.

4
  • What if that same site is working in EN since then user can type the language code in URL and view the secured content of other Language?
    – Harsh Baid
    Nov 21, 2016 at 10:46
  • Yes, if the currently authenticated visitor has access to content for that particular language. You can secure an entire language for different needs, read: roles & users Nov 21, 2016 at 10:58
  • What about Anonymous users?
    – Harsh Baid
    Nov 21, 2016 at 12:55
  • If the website is configured so that anonymous users cannot access either the site of the language then they will get the required login screen. Nov 21, 2016 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.