More in this section

Forums / Developing with Sitefinity / Limit user with restricted rights

Limit user with restricted rights

2 posts, 0 answered
  1. Andrej Kaurin
    Andrej Kaurin avatar
    5 posts
    14 Mar 2007
    20 Jul 2009
    Link to this post
    I need to do the following:
    1) Create blog for restricted user
    2) Allow him to manipulate ONLY with posts in Blog that he owns
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    21 Jul 2009
    Link to this post
    Hi kaan,

    The permissions are based on roles and they apply to all blogs and posts. Your approach is achievable. It is possible to get the current user based on his/her username.

    For the backend - you can use UserManager.IsCurrentUserInRole method. You should map BlogsListView template and on Page Load check whether the current user is in a restricted role. If so, hide the other posts/blogs from the grid. By doing so the current user will see only his/her post in the RadGrid MasterTable.

    For the frontend we use BlogPosts control. There is an option to enable posts moderation or disable the posts. You can do this from Sitefinity UI. If you want to restrict particular users you should map ListPageDetails template and subscribe for repeater ItemDataBound event . Then check the user's role, find CommentLists control and set it as enabled or disabled (cmmLst.Enabled = false;)

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
2 posts, 0 answered