Forum

The forum is a free service supported by community members. Please consider opening a support ticket if you need timely help.

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 14 Oct 2010 07:46 PM by  Steve L
Portal roles
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages


New Member


Posts:
New Member


--
27 Sep 2010 01:30 PM
    Another quick question. How do I assign DNN security roles upon a successful payment? e.g. I got a role called "Premium" and I want to allow my customers to access certain pages only if they paid.
    0


    Veteran Member


    Posts:2956
    Veteran Member


    --
    27 Sep 2010 01:55 PM
    Hi,

    First set up your security role (e.g. "Premium") in the usual DNN screen Admin > Security Roles. You need to create a Role Group (e.g. "Products") and assign your new role to this group. For safety purposes, the Storefront only accepts security roles that are part of a Role Group. This way when you configure your product, you wouldn't accidentally create a product that assigns the "Administrators" role to a customer. The role group is just a logical category and your security role will continue to work just like any role.

    From your Storefront admin, go to Configuration > Settings and look under Security dropdown. Set the Allowed Role Group field to the new Role Group you created. You can set several Role Groups by separating them with a "|" pipe delimiter. Save your settings.

    Now go to your product variant and create a new Action. The easiest way is to use one of the common templates already available and modify the XSL slightly to assign the new "Premium" security role you created.

    That's it. You'll find in the templates, examples of how to assign multiple roles, expire a role and do more powerful stuff. :)

    Thanks,
    0


    New Member


    Posts:
    New Member


    --
    14 Oct 2010 04:58 PM
    Will your store also add a user to a role if my product price is free?
    0


    Veteran Member


    Posts:2956
    Veteran Member


    --
    14 Oct 2010 07:46 PM
    Hi,

    Yes, it's completely up to you to define the action to add a role (or multiple roles) even for a free product (or not free). Completely customizable.

    Thanks!
    0
    You are not authorized to post a reply.