Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Faraz Ahmed 13 posts 126 karma points
    May 02, 2018 @ 10:10
    Faraz Ahmed
    0

    Role based redirections

    Hi,

    In my current website, I have three different areas on which I have applied the role based authentication which is working fine. Each area has it's own login page and whenever a public user click on the area, he/she is taken to the login page specified for that area and once the user has logged in successfully, the user is returned back to the area.

    I want to remove the three areas from menu and provide just one common login. Once the user logs in, i want the website to identify the role of the user and redirect it to it's designated area.

    How can I do that?

    Regards, Faraz

  • pranjal 75 posts 188 karma points
    May 02, 2018 @ 10:15
    pranjal
    0

    For role base authorization Use Roles class from System.web.security

    on login method just check user's role by IsinRole method and based upon condition redirect to specific area.

  • Faraz Ahmed 13 posts 126 karma points
    May 02, 2018 @ 10:17
    Faraz Ahmed
    0

    When you say login method, do you mean actual backend code or the frontend razor code?

    Please note that I am using membership module of umbraco and there was no backend coding involved in that role based authentication.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies