Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Role selector on document type View modes: 
User avatar
Member
Member
jaykzoo-yahoo - 4/12/2010 1:24:27 PM
   
Role selector on document type
I want to allow our clients to login to a page and see only their pdfs. I set up a role for each client (each client can have multiple users.)

I have a pdf document type that i would like to have a field that i can select a role.

Then, i would like to have my repeater that is displaying the pdf document type only show the pdf's for the signed in user's role.

If there is a better way of going about this, i'd be interested in any opinions.

thanks

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 4/13/2010 7:27:04 AM
   
RE:Role selector on document type
Hello,

you can use the way like that.

The repeater can be one for a role (then you can use Display to roles property). Otherwise, you can use only one repeater for all the items and add the Where condition like that:

{%UserId%} IN (SELECT UserID FROM CMS_UserRole WHERE RoleId = your_role_field)

{%UserId%} is a context macro (Macro documentation) and your_role_field should store the ID of role.


Best regards,
Helena Grulichova