Copied to clipboard

Flag this post as spam?

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


  • Anders Brohäll 294 posts 560 karma points c-trib
    Aug 22, 2018 @ 08:57
    Anders Brohäll
    0

    Using returnPath with umbracologin to actual site

    I was hoping to be able to use the /umbraco#/login/false?returnPath=/ to enable a password protection of a site. Hoping that the ?returnPath=/ would be relative to the site rather than to /umbraco. I tried ?returnPath=~/ too, but without luck.

    Is it possible to get the umbraco login to redirect relative to www.domain.ext instead of www.domain.ext/umbraco#?

  • Dave Woestenborghs 3253 posts 11053 karma points MVP 5x admin c-trib
    Aug 22, 2018 @ 09:29
    Dave Woestenborghs
    0

    Hi Anders,

    I am not fully understanding what you are trying to achieve.

    Do you want to password proctect your site for visitors, so the need to create an account and login first ?

    Or do you want the site only be visible for users that are editors in the backend ?

    Dave

  • Anders Brohäll 294 posts 560 karma points c-trib
    Aug 22, 2018 @ 09:34
    Anders Brohäll
    0

    The goal is to password protect a test site using URL Rewrite:

    <rule name="AdminLockout" stopProcessing="true">
        <match url="(.*)" />
        <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{URL}" pattern="(DependencyHandler\.axd|favicon\.ico|umbraco|webresource|scriptresource)" negate="true" />
            <add input="{HTTP_COOKIE}" pattern="UMB_UCONTEXT=[^;]*" negate="true" />
        </conditions>
        <action type="Redirect" url="/umbraco#/login/false?returnPath=/{R:0}" redirectType="Temporary" />
    </rule>
    

    However, it only redirects the users to /umbraco#/. As per now we only have editors and admins, but i see scenarios where users would need permission for the site, but not for the back office.

  • Dave Woestenborghs 3253 posts 11053 karma points MVP 5x admin c-trib
    Aug 22, 2018 @ 09:41
    Dave Woestenborghs
    0

    Hi,

    If you want your site only to be visible to users that are editors in the backend that you can use this package : https://our.umbraco.com/projects/developer-tools/sitelock/

    When you need the visitors of your site to login to see a password protected area you will need to use members : https://our.umbraco.com/Documentation/Getting-Started/Data/Members/

    https://24days.in/umbraco-cms/2015/extending-membership/

    dave

  • Anders Brohäll 294 posts 560 karma points c-trib
    Aug 22, 2018 @ 12:43
    Anders Brohäll
    0

    Nah, not really what i'm looking for. The solution with URL Rewrite would be perfect, except for the return url not redirecting relative to the domain.

    So, the question is. Can I make that happen?

  • Dave Woestenborghs 3253 posts 11053 karma points MVP 5x admin c-trib
    Aug 22, 2018 @ 12:45
    Dave Woestenborghs
    0

    If you want them to login in to Umbraco you will need the /umbraco path in your ur

    Still not clear what you trying to achieve by the way.

    Dave

  • Anders Brohäll 294 posts 560 karma points c-trib
    Aug 22, 2018 @ 12:54
    Anders Brohäll
    0

    Scenario: A user (ie an editor) access a site with the URL https://dev.whatever.ext, meets the Umbraco login. After a successful login the user gets redirected to the root of the domain.

    Another scenario is that the user accesses https://dev.whatever.ext/help -> a successful login redirects to https://dev.whatever.ext/help.

    Thus, the Umbraco login screen intercepts any calls to the site - if the visitor isn't logged on already.

  • Dave Woestenborghs 3253 posts 11053 karma points MVP 5x admin c-trib
    Aug 22, 2018 @ 13:02
    Dave Woestenborghs
    0

    Hi Anders,

    I get that you want to lock down your site so it is only visible to editors logged in the backend. That is exactly what site lock does except for the redirecting to the umbraco login page and back to the last visited page when you are logged in,

    The login is designed for logging in the backoffice. Not for restricting site access.

    I think you need to build a custom login screen,,,or use sitelock and tell them to login in first to see the site.

    Dave

  • Anders Brohäll 294 posts 560 karma points c-trib
    Aug 22, 2018 @ 13:10
    Anders Brohäll
    0

    That ''except" part is one of the problems with Sitelock. Also, what I'm trying to achieve is to make so that the users don't necessarily sees the back office. And they do using Sitelock.

    Well, thats what i'm asking for. If i can use the back office login anyway. The only thing that doesn't work is the redirect. But i guess i'm struck out of luck.

  • Dave Woestenborghs 3253 posts 11053 karma points MVP 5x admin c-trib
    Aug 22, 2018 @ 13:18
    Dave Woestenborghs
    0

    If the users don't need access to backoffice you should go with members.

    Dave

  • Anders Brohäll 294 posts 560 karma points c-trib
    Aug 28, 2018 @ 14:26
    Anders Brohäll
    0

    Well, I was hoping not to, since most of the people browsing the site are Users. I don't want to depend on duplicates.

    That said, during a development phase the clients want to browse the site. They've got different stakeholders. Most of them are involved in the process - and will be working with Umbraco. Others just wants to browse the site, like members of the boars, CEOs etc. The latter wouldn't want to be redirected to the back office, it's just confusing.

    But yes, I guess custom is the way to go. Annoying since everything except for the last part is fully functional.

  • Anders Brohäll 294 posts 560 karma points c-trib
    Aug 28, 2018 @ 14:28
  • Matt Barlow (jacker.io) 151 posts 681 karma points c-trib
    Jun 28, 2019 @ 13:55
    Matt Barlow (jacker.io)
    0

    Did anyone find a solution to this? I have the same use-case as Anders, I want to be able to use returnPath to redirect to the front end not the back office.

Please Sign in or register to post replies

Write your reply to:

Draft