Developer forum

Forum » Templates » Content only allowed to certain groups...

Content only allowed to certain groups...

Lise T. Pedersen
Reply

I have some products with some datasheets shown for each product. If you log in, you get acces to some more specific datasheets.

And now to the problem. I now have two different groups, if logged in from one group, you may also see a pricelist (as pdf) - but if you belong to the other group, you must not.

All access must be controlled in the same product-template - any suggestions on how to solve this?

/Lise


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Lise

Checking permissions in the template is not good. Could be insecure.

You can do a <!--@ If(Global:Extranet.Groups<contains>YourGroupID)--> to check if the user is member of a group.

Nicolai

 
Lise T. Pedersen
Reply

Thanks - looks like it is worth trying - but is it possible to find some general guidelines somewhere about how to make this sort of "if expressions" for testing global tags in XSLT - I'm not succeeding in making the template translate it properly to XSLT, and I need it this way.

/Lise

 
Nicolai Høeg Pedersen
Reply

Hi Lise

You do not need an XSLT file - the conditional up here is in HTML template.

If you need XSLT guides, I can recommend this: http://www.w3schools.com/xsl/xsl_if.asp

Or post your problem here, and I'll see if we can help.

Nicolai

 
Lise T. Pedersen
Reply

My starting point is this product template http://www.arctiko.com/Default.aspx?ID=887&GroupID=GROUP3&ProductID=PROD109&PID=1719 (a solution we have "inherited" from another partner.) and it is programmed in xslt.
Would rather prefer not to need to write it from the start again, although i'm not very fond of xslt at all.

But i'm sure some more questions will appear...

Thanks so far.

/Lise

 

You must be logged in to post in the forum