+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Related Data / User Profile

Related Data / User Profile

4 posts, 0 answered
  1. Scott
    Scott avatar
    6 posts
    Registered:
    26 Apr 2013
    27 May 2014
    Link to this post

    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..

  2. Georgi Mateev
    Georgi Mateev avatar
    12 posts
    Registered:
    02 Mar 2016
    30 May 2014
    Link to this post
    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
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  3. Scott
    Scott avatar
    6 posts
    Registered:
    26 Apr 2013
    05 Jun 2014 in reply to Georgi Mateev
    Link to this post

    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?

  4. Elena Ganeva
    Elena Ganeva avatar
    36 posts
    Registered:
    20 Jul 2016
    10 Jun 2014
    Link to this post

    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:

    http://www.sitefinity.com/documentation/documentationarticles/tutorial-create-devreach-site-with-related-data-feature 

    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.


    Regards,
    Elena Ganeva
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
4 posts, 0 answered