1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Membership for website users.

Membership for website users.

9 posts, 0 answered
  1. Simon
    Simon avatar
    31 posts
    Registered:
    01 May 2009
    13 Jul 2009
    Link to this post
    Hi,
    I have a requirement to allow users to log into my sitefinity created site. I then need to be able to recognise the logged in user by means of authentication/authorisation and allow them access to specific pages.
    Should site membership be handled through the users section in admin, creating a role of 'user' for example?
    What is the best way to go about this?
    Many Thanks.
    Simon.
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    13 Jul 2009
    Link to this post
    Hi Simon,

    Thank you for using our services.

    Sitefinity uses the membership services included in the .NET Framework to create, modify, and validate user credentials and to manage user settings such as passwords and e-mail addresses. This also includes role membership, which allows you to set different permissions for particular user groups in your web-site. If you do not want to manage all of this with code, you can easily achieve it though the the users section in the admin. You can give permissions to user groups to enter the cms part or not. You can also deny anonymous users from viewing certain parts of your web-site, and those parts will be also visible to registered users.
    To gather more information on Sitefinity's security, please take at the Securiry section of our Developer Manual. For instance you could use Login control and and subscribe for the following event on Page_Load
    this.Login1.LoggedIn += new EventHandler(Login1_LoggedIn); Then after the user is authenticated you can redirect it to his/hers personal section.

    I hope that you will find this information helful. Please feel free to contact us if you have more questions.

     
    Greetings,
    Rado
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Simon
    Simon avatar
    31 posts
    Registered:
    01 May 2009
    14 Jul 2009
    Link to this post
    Hi Rado,
    Thanks for your quick reply.
    I've started implementing authorisation/authentication but have come across a problem.
    I've created two new users, one should be able to view the entire site but doesn't have cms access and one should not be able to view certain pages and also does not have cms access.

    For the page that users require authorisation to view, I've turned off permissions inheritance.
    For the role I want to have access I have checked 'allow' view and 'deny' all other options. 
    For the role I want to deny access I've checked 'deny' in all options including view.
    In the properties of that page I've set anonymous access to 'deny'.

    When I log in as a user who is a member of either of these roles I cannot access the cms which is correct, however both roles allow me to view the page which I've set to 'deny' view, ie both roles can view the entire site including the page I want to be protected.

    Have I missed a step somewhere?
    Regards
    Simon
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    15 Jul 2009
    Link to this post
    Hi Simon,

    From the scenario you described I see that you have two roles. Each of these roles does not have access to the backend by setting CMS access to deny. This means that your users cannot access Sitefinity Admin area.
    However, you say that the users can browse and see the public part of the website without problems and restrictions do not apply. It is not possible your user to see a page with deny anonymous set to true and view set to deny. Please check whether the inheritance has broken something. You can give a try with simple restricted page. Also by setting the page to deny anonymous it should not be visible in the navigation. If you try to access it through url you will be redirected to the login form to authenticate yourself.

    If the problem persists you can send us a credentials to a sample website where we can reproduce the problem at your end.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Simon
    Simon avatar
    31 posts
    Registered:
    01 May 2009
    15 Jul 2009
    Link to this post
    Hi Ivan,
    I was working with user's that were already admins of the cms. When I swapped their role to one that shouldn't have access to all pages it didn't work.
    However when I add users via the Create User Login control and assign them to a role everything works fine and as this is how the site will be working there's no problem.

    Cheers
    Simon
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    16 Jul 2009
    Link to this post
    Hi Simon,

    Administrators have unrestricted permissions by default which cannot be changed. I am glad to hear that everything works fine. If you need further assistance, let us know.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Humair Memon
    Humair Memon avatar
    2 posts
    Registered:
    22 Oct 2009
    22 Oct 2009
    Link to this post
    hi
    when my site user is not log in my example page, shouldn't display to user

    how can i use this restriction for my site user?

  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    22 Oct 2009
    Link to this post
    Hi Humair Memon,

    You can set Deny Anonymous property of the desired page. By doing so all not authenticated users will not able to see it.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  9. Humair Memon
    Humair Memon avatar
    2 posts
    Registered:
    22 Oct 2009
    22 Oct 2009
    Link to this post
    thanks brother

Register for webinar
9 posts, 0 answered