Mitchel's Forums

Subject: Deny more than text/html to user roles
Prev Next
You are not authorized to post a reply.

AuthorMessages
whetstoneUser is Offline
New Poster
New Poster
Posts:5

05/20/2008 11:20 AM  

Hi Mitchel, I'm looking for a way to allow the general public to see a page with regular prices, and the logged in user to see better prices but not still see the regular prices.  I can't just use the authenticated role because there are multiple roles for the site. For example a visitor may be a general public, a distributor, international distributor, favored distributor, family friend. Each role should only see their respective page. Your deny text/html module is great for the text/html, but what do I do to remove other types of content for a security role? Like a whole page? Thanks Mitch, If anyone knows how to do this, it'd be you.

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5607

05/20/2008 11:35 AM  
Well, this is something that is a bit hard to do, depending on exactly what modules you are using. The only way to ensure that you don't have cascading permissions sets would be to have specific module instances for EACH role.

So for example if you have Distributor and International Distributor roles defined. You would put 2 instances of the module on a page. One ONLY visible to Distributors and one ONLY visible to International Distributors. Now this only works if a person doesn't have access to mutiple.

You could apply this same logic, and do it was multiple pages. Or depending on what you are working with a custom module might provide you the best overall functionality/administration.

The down side is if you have a third pricing set for "registered users" as that you cannot hide within default DNN permissions...then a custom module would be the only way to go.

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
whetstoneUser is Offline
New Poster
New Poster
Posts:5

05/20/2008 12:12 PM  

Thanks for the quick reply Mitchel,

Yeah, I've been putting those multiple module instances on pages and it worked fine on a site that required registration approval before seeing the pages with prices. With this situation, you know who they are by role names and can show them the chosen content.

Now a new site I'm doing can show regular prices to unregistered users and again to returning users who are now registered. But some other registered users get better pricing (distributors and such). When they are logged in, I'd like the regular prices to disappear and only the distributor prices to be visible. That means I either have to manually assign all regular customers to a "customers" role every time a new one appears, or I have to have a way to deny the regular prices page to the distributors role. There is a lot of traffic - so the latter option is preferred. It comes down to having the ability to deny a page based on a role.  - - Unless there is a configuration trick that I havn't thought of yet.

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:5607

05/20/2008 1:33 PM  
If I understand your process, you can actually do this quite easily for your users....I believe you need to display prices for the following sets of people.

Unauthenticated
Authenticated (non-special)
Distributors
International Distributors

Only 1 price set is active at a time, and by default people should see the "authenticated" prices if they don't have one of the other two roles.

What you can do in this case is create a new role called "Public User", in the properties for that role set it up as Public and to auto assign. This will grant this role to ALL newly created accounts. Then when you grant the user an elevated role, simply remove the "public user" role from them. This way you are still inside the confines of the DNN system, and keep fairly simple user administration.

-Mitchel Sellers
MCITP, MCPD, MCTS
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

3Essentials is my recommended Shared Hosting Provider

This site is hosted on a VPS from HostMySIte.com

Mosso is my recommended cloud computing provider. Use reference code REF-ICG to get $100 off your second month!

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
whetstoneUser is Offline
New Poster
New Poster
Posts:5

05/21/2008 8:33 AM  

Why yes! I believe that will work smartly. That is a fine solution Mitchel. Simple and elegant. I'll do it. Thank you!            

You are not authorized to post a reply.
Forums >Development Discussion >DotNetNuke > Deny more than text/html to user roles



ActiveForums 3.7