Related Data / User Profile
I have some custom modules that I now want to start differentiating who sees them.. For Example, we have a custom type called Products, and I want to add an attribute to them to allow me to filter who sees which items, based on an attribute in the User Profile? We were waiting for permissions to be set on custom types, but it doesn't look like that will happen soon enough for our target implementation date, so we started looking at alternatives..
One thing I thought about was using Related Data, for example, having a content type called Department, then a related attribute on the user profile, and a list for the content items? However, I can't seem to add Related data as a custom field on the User Profile.. Would this also hit a wall because of the Multiple Child issue discussed in other threads?
We have also considered reverting our custom content types to extended built in content types.. for example blog posts, then we could get the Role/Permission behavior that way, but that strikes me as backwards..
So.. Is it possible to do with Related Data (Even if I have to do some back end coding?) I would like to have an attribute on the user profile be available to filter the custom content lists on a page..
Hi Scott,
Currently we don't have related data and media fields for custom user profiles and there is a feature request about this in our feedback portal.
You can implement permissions for your custom modules yourself.
Please carefully check how this custom module is implemented and apply the code related to permissions. Then explore how our permissions api is working and how to implement security.
When you have the above code working, you can permit or deny action on items of your choice for selected users. This way in your views you can show items that the current user can see.
Regards,
Georgi Mateev
Telerik
Hi, so if we had built up all our modules in Module Builder and set up the related data.. How would we then extend them using this code sample.. Are the modules built in Module builder extendable via code? can they be subclassed? or do we have to start over?
Hello Scott,
I have been looking into your questions and I could suggest you check our DevReach site sample which demonstrates how you can achieve the desired functionality through code:
In the following article we are creating relation between current user and a dynamic content, so I can recommend you use the same approach to relate your users to the content items that you want to secure:
http://www.sitefinity.com/documentation/documentationarticles/implement-the-code-behind
More information about our related data API you can find here:
http://www.sitefinity.com/documentation/documentationarticles/related-data-api
If you need any additional assistance on this functionality please do not hesitate to contact us.