Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Restricting content per user or user group View modes: 
User avatar
Member
Member
james-microsec.co - 1/17/2010 4:25:13 AM
   
Restricting content per user or user group
Hi all,
I'm interested in using Kentico for a website a customer has asked for.

One core feature we need is the ability to restrict the visibility of content by user - or preferably by group of users. Is this possible?

Thanks,

James

User avatar
Member
Member
tabish.friend-gmail - 1/17/2010 11:01:50 PM
   
RE:Restricting content per user or user group
HI

Yes you can set particular content for particular user by setting its visibility property.



Thanks

Tabish Matin

User avatar
Member
Member
tabish.friend-gmail - 1/17/2010 11:09:02 PM
   
RE:Restricting content per user or user group
For example it could look like:

{%id == "1"%}

Every web part/widget will have a different number of id in Visibility property. Then if you call the URL with the id query string it displays only the one requested web part/control.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/18/2010 6:04:37 AM
   
RE:Restricting content per user or user group
Hi,

Better way of doing this would be to set appropriate permissions for the documents for particular users and roles and then set the web parts to check permissions to display personalized content.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
ozzuary-yahoo - 8/5/2010 3:56:07 PM
   
RE:Restricting content per user or user group
What about restricting what widgets the user has access too based on their role/permissions when customizing their 'MyHomePage'.

Side Question:
Is it possible to assign users who sign up to different roles? Like when a user signs up they can apply to be a Level 1 Contractor, Level 2 Contractor, Level 3 Contractor. Once approved then they have that role, otherwise they get the general default role

Take the sample community site for example. I got to 'MyHomePage'. I go to add a widget. Could I restrict access to the syndication folder so that only level 2 and 3 contractors can use these widgets? Further, could I restrict access in the content folder so that only level 3 contractor can see the daily dilbert widget and ny times widget?

I want to give each level (or department) the ability to customize a portal, but I dont want to give each department access to all the same widgets when personalizing their 'MyHomePage'.

Also, would it be possible in 'MyHomePage' to give the ability to the user to access multiple tabs, and create and name tabs that each hold their own custom set of widgets? Like have a tab for news, a tab for data charts, tab for employee roster, etc.? Similar to 'MyYahoo'?

This is several questions, but is all of this possible with Kentico? If so is there a reference, sample, or place I can find out how to accomplish these things in the demo?

Thanks,

Ozz



Level 1 contractor

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/11/2010 3:49:36 AM
   
RE:Restricting content per user or user group
Hi,

Yes, it is possible to assign users to roles after they registered. By default, in the registration for or custom registration form web parts there is property where you can set the user role. If you want to assign user dynamically to different roles according to same data collected on the registration form, you can do it in the web part's code behind in a decision statement, in which you will change the "assign user to role" property as you need (modifying web part's code).

The widget folders are displayed dynamically - if there is nothing in the folder or nothing to display for given role, it is not displayed. In this case you need to set appropriate security in Site Manager -> Development -> Widgets -> select a widget -> Security tab. So, for example in folder A you will allow the widgets for role A only and in folder B for role B. So user in role A, won't see the B folder (security settings).

Best regards,
Juraj Ondrus