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

Forums / Security / Different Blog/News for different roles

Different Blog/News for different roles

2 posts, 0 answered
  1. Muhammad Saqib
    Muhammad Saqib avatar
    95 posts
    Registered:
    09 Sep 2009
    30 Oct 2009
    Link to this post
    Hi,

    I am not sure whether this has already been discussed or not, but i was unable to find out..
    The solution i am looking for is i have Blog Posts control on my main page, i want to show different blog posts depending upon the Role of the logged in user. Same is with News Categories.
    Can any one please tell me how can i achieve this.
    I am using SF 3.7 with SP1. Community Edition.

    Thanks,
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    30 Oct 2009
    Link to this post
    Hello Muhammad Saqib,

    You need to create a custom class that inherits from BlogPosts control. Then override SetItemMetaData method where you have access the the content item. In the method call UserManager.UserManager.GetCurrentUserRoles to check whether the user belongs to the roles allowed to see this content. You should follow the same logic for NewsView, since both the controls inherits from one  base class ContentView.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered