Copied to clipboard

Flag this post as spam?

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


  • adarsh 46 posts 66 karma points
    Mar 18, 2011 @ 17:25
    adarsh
    0

    Giving special Privilege to member of the website from the front end

    hi

    i dont no  whether iam asking a silly question or not

    my question is whether i can give special privilege to member in front end when they  login in to the website,like member who is having a special privilege can access the special events. and mebers who is not having a special privilege cannot access the event. but he can all the content.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 18, 2011 @ 19:11
    Jan Skovgaard
    0

    Hi Adarsh

    There are no silly questions in here. We're here to help each other out :-)

    Yes it is possible to give members access to pages that regular users can't see.

    What you need to do is create a member type, a member group and some members in the member section.

    In the content section you can then setup "public access" on a single node or more nodes or a branch of nodes. If you set public access on a node, that has child nodes the settings are automatically inherited to all the child nodes.

    I hope the above makes sense and is enough to get you started.

    Otherwise please don't hesitate to ask again.

    /Jan

  • adarsh 46 posts 66 karma points
    Mar 18, 2011 @ 22:08
    adarsh
    0

    Hi jan

    thanks 

    i got some idea, i will work on it. 

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 18, 2011 @ 23:07
    Jan Skovgaard
    0

    Hi adarsh

    That's good to hear.

    As I said before don't hesistate to ask if something does not make sense. That is often the most fast way forward :-)

    Happy umbracoing.

    /Jan

  • adarsh 46 posts 66 karma points
    Mar 21, 2011 @ 18:28
    adarsh
    0

    I created a member and a member type in Umbraco.

    My question now is how can I check with cookies if the member is logged in.

    Many thanks in advance for you help.

    Adarsh

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 21, 2011 @ 19:01
    Jan Skovgaard
    0

    Hi Adarsh

    Is there any specific reason why you want to use a cookie for this?

    You can use the asp.net controls to do this for you.

    You can read more about the controls here:http://msdn.microsoft.com/en-us/library/ms178329.aspx

    They can be used directly in the templates in Umbraco since they're based on the .net masterpages.

    So to create a simple login box you can write <asp:Login />

    To see the login status you can use <asp:LoginStatus /> etc.

    It's all standard ASP.NET.

    Hope this makes sense.

    /Jan

  • adarsh 46 posts 66 karma points
    Mar 21, 2011 @ 20:37
    adarsh
    0

    Hi Jan 

    i created asp.net controls and i can login in to the website every thing is working fine by the member what i created. but my problem is

    when the member login i need to check whether they are having rights(membership) to see the special events, if he is not a membership older he  

    cannot see the events in the website.

    so i thought of i need to use cookies for that i need to check the cookies.

    i dont whether it is correct or not.

    thanks 

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 21, 2011 @ 20:41
    Jan Skovgaard
    0

    Hi Ardash

    You need to right click the node that needs to have the restricted access only viewable for members.

    When you right click you should see an item in the context menu that appears that says "Public access". Here you can choose single or group. When you choose group you can drag and drop what member groups should be allowed to access this specific node (Or branch of nodes if it has child nodes). Then you need to select the login page and an error page, which you can set to the same page as login.

    I hope this makes sense? :-)

    /Jan

  • adarsh 46 posts 66 karma points
    Mar 21, 2011 @ 20:50
    adarsh
    0

    hi Jan

    i hope not troubling you with my questions.

    but i think the i find the solutions, what you specified above

    thanks Jan.

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 21, 2011 @ 20:54
    Jan Skovgaard
    1

    Hi Ardash

    No need to be worried. I and all the other nice people in here are here to help each other out. We all know how it is to be new at something and it's always nice to get some help when there is something you just can't figure out yourself.

    It's better to just ask than to spend hours going nowhere - So please feel free to ask further questions if there is something you need to know.

    Think about it this way: The questions you ask can benefit others in the future as well so actually you're potentially helping others out by asking :-)

    /Jan

  • Iain Martin 54 posts 98 karma points
    Mar 21, 2011 @ 21:55
    Iain Martin
    0

    Is it possible to automatically 'hide' the nodes or documents that are set to member or role access without putting in another property on to the page? Or  create a macro that could do the setting without the user having to set up the login and error pages?Whilst as a developer I am happy setting this. I would rather the user didn't have to worry too much about settings that they may or may not understand. One click setup - that's the goal!

    Adarsh and myself are working on the same project, so my question about linking members to events will be also be used in this scenario for this site.

    Regards

    Iain

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 21, 2011 @ 22:08
    Jan Skovgaard
    0

    Hi Lain

    Yes it's possible.

    There are some XSLT extensions, which makes it a breeze to make sure certain pages are not visible when there has been setup public access to a specific member group. There is a good explanation on how to use the HasAccess extension here: http://our.umbraco.org/wiki/reference/umbracolibrary/hasaccess

    Usually I use this in combination with the IsLoggedIn Extension, which decides whether or not a user has been logged in. That's all it does. HasAccess decides whether or not the loggedin user has access to a certain node.

    Does this make sense?

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft