Restricting HTML elements in Views for user types

Topics: Customizing Orchard, Writing modules
Dec 31, 2012 at 4:23 PM

Hi everyone,

My question is 2-part:

  • What is the best practice for restricting or altering views based on user type? Should I do this simply in the view or perhaps in the controller where I compose the shape?
  • How do I do this if in the view?

My need is that I want to create a new type of user called Wholesale. My Product type will have a normal Price and a PriceWholesale. I want non-wholesale users to see the normal price and wholesale users to see both.

Thanks!

Jan 2, 2013 at 9:20 PM

I guess first I would need to find the user id of the currently authenticated user. How might I do that?

Jan 7, 2013 at 7:59 PM

*bump*