Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

DotNetNuke Marketplace
  Ads  
Biz Modules provides professional business modules and solutions for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  User Defined Ta...  Referencing User Roles in xsl
Previous Previous
 
Next Next
New Post 6/13/2008 11:17 AM
Resolved
User is offline Stuartt
3 posts
10th Ranked


Referencing User Roles in xsl 

Hi, I'm attempting to edit the OnlyOwnItems.xsl file to display the information I want (for specific users based on role).

I just want to add a test to allow users with a specific role to be able to view all items (so in other words, the "for" statements would be true for 1) the user that created the row, 2) administrator, and 3) the "Attendance Viewer" role that I created. I can't figure out for the life of me how to test if the current user is in that role!

Basically I'm not sure whether when it says "|role1|" if I'm supposed to type my role name instead of role'x' or what? I'm probably doing something slightly wrong, but that is the way it always is isn't it?

Below is one of my tries. Can you give me any tips? Using UDT 3.04

<xsl:variable name ="IsViewer"   select="contains(//udt:Context/udt:Roles,'|Attendance Viewer|')"/> 

 

This isn't registering as "True" though.

 

Thank you very much! 

 

 
New Post 6/13/2008 3:26 PM
User is offline Stefan Cullmann
1553 posts
5th Ranked








Re: Referencing User Roles in xsl 

Stuartt, there is only a  typo, everything else is ok and should work.

<xsl:variable name ="IsViewer"   select="contains(//udt:Context/udt:UserRoles,'|Attendance Viewer|')"/>

 Stuartt wrote

Thank you very much!  

You are welcome!


Stefan Cullmann - stefan.cullmann [at] dotnetnuke.com
form and List will be the successor of the User Defined Table module.
----------------------------------------------------------------------
Do you want to import external data to form and List /User Defined Table?
Check out http://www.codeplex.com/Csv2UDTImport
 
New Post 6/16/2008 1:06 PM
User is offline Stuartt
3 posts
10th Ranked


Re: Referencing User Roles in xsl 

Hi Stefan,

I tried it that way, but it shows none of the items for users in that role. I don't get an error with the xsl file, but it doesn't seem to be recognizing the Attendance Viewer role. I can do what I need by hardcoding the specific usernames, but that is a long list.

Do you see anything else that might be off, or know of another way to reference users who are in a specific custom role? Obviously I don't want to make these users all administrators.

Thanks again for your help!

 
New Post 6/16/2008 3:12 PM
User is offline Stefan Cullmann
1553 posts
5th Ranked








Re: Referencing User Roles in xsl 

Weired.

Login as a user that is member of the Attendance Viewer role and look at the XML behind (via module action menu), verify that it contains |Attendance Viewer|. Compare again with your XSL. You can also download XML and XSL and test it offline, for example in VS2008 professional.

Feel free to send me XML and XSL per mail, maybe I can help.


Stefan Cullmann - stefan.cullmann [at] dotnetnuke.com
form and List will be the successor of the User Defined Table module.
----------------------------------------------------------------------
Do you want to import external data to form and List /User Defined Table?
Check out http://www.codeplex.com/Csv2UDTImport
 
New Post 6/16/2008 4:57 PM
User is offline Stuartt
3 posts
10th Ranked


Re: Referencing User Roles in xsl 

I knew it was something simple. I typed Viewer instead of Viewers. Making me check the xml helped me find it. Wonderful work. Cheers!

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  User Defined Ta...  Referencing User Roles in xsl
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DNN Photo Gallery
Complete Photo Gallery Management!
www.dnnPhotoGallery.com
R2i - Delivering Serious DNN Services & Solutions
Award Winning Design, Skin construction, Custom Modules and Consulting Services for the Enterprise organization. R2i is the DNN:Map module Project Lead and one of the largest DNN service providers with offices in New York City, Virginia and Baltimore.
www.bi4ce.com
"SalarO" Skinning Graphic Design Branding Services
SalarO develops packaged & custom skins for your DNN at prices you can afford. SalarO is also developing Module development, Hosting, Branding/Logo design as well as Content Transfer Services to complement the core skinning solutions.
www.salaro.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP