I am currently trying to create a 'single user protection' login for a page on our website. I have followed the proceedure to do so but for some reason the page is still accessable without having to login.
I feel I maybe making a mistake on the 'Select the pages that contain login form and error messages' section - for the login page I have picked the actual page I am trying to protect - do I need to create a seperate login page somewhere in the CMS and link to that instead? For the error page I am simply pointing to our 404.
You also need to make sure that the code, which renders the page checks if it's password protected or not.
So are you using Razor or XSLT to render the page? Please let us know and share some code so we can provide examples of how to ensure people who have not been granted access won't be able to see the page.
The best practice is usually to create a page specifically for login, which renders your login control, since you can the pick it as the error page as well so people who are trying to access the protected page will be redirected to the login page instead.
The way I do it when I work with the public assess single or rollbased projection is that I made a login page, and make the page that should have restriced accees. And it´s on the page that should be restriced that you set the public access, where you chosee the login page, and the 404. http://our.umbraco.org/wiki/reference/umbraco-client/context-menus/public-access
Not that I know of but Dennis might know one - It's been a while since I had my hands down'n'dirty.
But basically you just need to create a page in your content structure and then you need to create a macro with the login form, which can be inserted on the page in the rich text editor (if your pages have a rich text editor on them).
If not you can simply make a new template in the "Settings" section under "Templates" called "login" and then you can add it as a possible template for your "Page" document type. In the content section you can then create a login page based on your "Page" document type and then in the properties panel you can select the "Login" template for this page instead of the default template.
If you are using Umbraco 7 and MVC razor you could take a look on this blog post, I think it explains very well on how to setup a login page, and single or role based protection.
Cheers guys, from the look of it I seem to be missing some of the sections that I need to make the appropriate changes. I cannot see settings or templates. I am using version v6.1.6 by the way.
Okay you have a limit user account, you need to get in tocuh with a person that has an administrator account. He needs to give you access to these sections, if you know the username and password for the account that was used back then when the installation was setup you can login into the backoffice with this account and give your own user access to the sections settings and developer.
In Umbraco 6, you also have the pre-code snippets for a login form, under the developer section, and Partail Views Macro.
Public Assess issue
Hi,
I am currently trying to create a 'single user protection' login for a page on our website. I have followed the proceedure to do so but for some reason the page is still accessable without having to login.
I feel I maybe making a mistake on the 'Select the pages that contain login form and error messages' section - for the login page I have picked the actual page I am trying to protect - do I need to create a seperate login page somewhere in the CMS and link to that instead? For the error page I am simply pointing to our 404.
Any help would be appreciated.
Tim
Hi Tim and welcome to our :)
You also need to make sure that the code, which renders the page checks if it's password protected or not.
So are you using Razor or XSLT to render the page? Please let us know and share some code so we can provide examples of how to ensure people who have not been granted access won't be able to see the page.
The best practice is usually to create a page specifically for login, which renders your login control, since you can the pick it as the error page as well so people who are trying to access the protected page will be redirected to the login page instead.
Hope this helps a bit.
/Jan
Hi Tim and welcome to our.
The way I do it when I work with the public assess single or rollbased projection is that I made a login page, and make the page that should have restriced accees. And it´s on the page that should be restriced that you set the public access, where you chosee the login page, and the 404. http://our.umbraco.org/wiki/reference/umbraco-client/context-menus/public-access
If you have access to the Umbraco TV. you can watch this chapter about working with members and public access, http://umbraco.tv/videos/umbraco-v7/content-editor/administrative-content/members/role-based-protection/
Here is some screenshots from a project that I have made hope this can help you.
And it is the my page ("min side") that have the public access on it.
Hope this helps, and make sense happy Umbraco coding.
/Dennis
Cheers for the help, guys.
Is there a tutorial to help me create a separate login page?
Hi Tim
Not that I know of but Dennis might know one - It's been a while since I had my hands down'n'dirty.
But basically you just need to create a page in your content structure and then you need to create a macro with the login form, which can be inserted on the page in the rich text editor (if your pages have a rich text editor on them).
If not you can simply make a new template in the "Settings" section under "Templates" called "login" and then you can add it as a possible template for your "Page" document type. In the content section you can then create a login page based on your "Page" document type and then in the properties panel you can select the "Login" template for this page instead of the default template.
Hope this makes sense.
/Jan
Hi Tim,
If you are using Umbraco 7 and MVC razor you could take a look on this blog post, I think it explains very well on how to setup a login page, and single or role based protection.
http://siempresolutions.co.uk/blog/Umbraco_Members_Protected_Area_of_Website
Hope this helps, if not don't hesitate to write again.
/Dennis
Cheers guys, from the look of it I seem to be missing some of the sections that I need to make the appropriate changes. I cannot see settings or templates. I am using version v6.1.6 by the way.
Hi Tim,
Okay you have a limit user account, you need to get in tocuh with a person that has an administrator account. He needs to give you access to these sections, if you know the username and password for the account that was used back then when the installation was setup you can login into the backoffice with this account and give your own user access to the sections settings and developer.
In Umbraco 6, you also have the pre-code snippets for a login form, under the developer section, and Partail Views Macro.
Hope this helps,
/Dennis
is working on a reply...