Redirect unauthenticated users to my own login page

Posted by Community Admin on 04-Aug-2018 09:45

Redirect unauthenticated users to my own login page

All Replies

Posted by Community Admin on 22-Jun-2013 00:00

Hello,
I have demo folder in my sitefinity app. Demo folder contains pdf files. I want to do something like when someone search pdf and click on it, user must be redirect to my custom login page instead of sitefinity login page. I did the below code in web.config file and it works fine but i am redirecting to sitefinity login page. I want to redirect users to my custom login page. Can any one suggest me the code or something help !! Here is the web.config code:

  <location path="doc">
    <system.web>
      <authorization>
        <allow users="Admin"/>
        <deny users="*"/>
        <!--Deny everyone else Admin role Users-->
      </authorization>
    </system.web>
  </location>

Posted by Community Admin on 26-Jun-2013 00:00

Hi,

I have already responded in your support ticket.

Regards,
Jen Peleva
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 16-Oct-2013 00:00

It would be nice to see the solution here as well.

Posted by Community Admin on 16-Oct-2013 00:00

The only way we could get it to work is to use the SF permissions to handle it.   So in the advanced settings setup the frontendlogin url.  That tells SF which page to load when the user doesn't have permissions.

The PROBLEM is that the pages\resources need to be physical sitefinity assets.  So like an external ASPX page secured with the webconfig would be totally hosed because it then goes to /Sitefinity/Login

Posted by Community Admin on 21-Oct-2013 00:00

Hi all,

 The way I managed to achieve this result is by using the custom handler to plugin your logic in the IMediaContentDownloadEvent which is executed each time a media content is being downloaded or viewed. Note to check if the content is a document there. 

Additionally you should be able to globally set the permissions from the parent object (the library) - see video. So I would suggest to have one library which is only for documents of this type and set the permissions directly from the library - the documents should inherit their permissions form it. I would also suggest to either remove the Allow: Authenticated or Deny: Anonymous.

Regards,
Ivan D. Dimitrov
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed