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
    09 Sep 2009
    30 Oct 2009
    Link to this post

    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.

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    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.

    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