Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListIs there any way to have a field only visible to certain rolesIs there any way to have a field only visible to certain roles
Previous
 
Next
New Post
6/21/2013 5:04 PM
 

Hi there,

I am trying to use the Form&List to show some affiliate promotions and I need to have a "Download Coupon" Field in the list view that is only visible to registered users.

I have created a download field and set it to be a restricted field, however it still shows in the listview (using xslt) to unauthenticated users.

Is it possible to do what I am trying or should I look into another solution?

Thanks in advance for your help.

 
New Post
6/22/2013 3:08 AM
 
Looks like I managed to make it work, not sure if it is the best way to go since I am not an xslt expert but here it goes:





Then just replace the strings for whatever roles should see the field and add ORs for any more roles you need.

Would be nice if that situation could be part of the documentation adn/or wiki.
 
New Post
7/17/2013 2:05 AM
 

May I know what was your solution to this?

 

Thanks in advance.

 
New Post
7/19/2013 9:23 AM
 

Oh, I'm sorry, looks like my code was stripped off. Let's try that again:

<xsl:if test="contains(//udt:Context/udt:UserRoles, 'Registered Users') or contains(//udt:Context/udt:UserRoles, 'Administrators')">
<xsl:value-of select="udt:Coupon" disable-output-escaping="yes" />
</xsl:if>

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListIs there any way to have a field only visible to certain rolesIs there any way to have a field only visible to certain roles


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.

Content Layout

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out