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

Forums / General Discussions / Post permission for a Specific Blog

Post permission for a Specific Blog

13 posts, 0 answered
  1. Pankaj
    Pankaj avatar
    39 posts
    Registered:
    27 Sep 2010
    08 Dec 2010
    Link to this post
    Hi,

    We have created different blogs under sitefinity Modules>Blog.
    We want a specific role to have 'post' permission in a specific blog.
    We see the permission option for all blogs but not to a specific blog.
    Please suggest how to get this.

    Regards
    Pankaj
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    08 Dec 2010
    Link to this post
    Hi Pankaj,

    Permissions are set per provider and they are not specific for a single blog or a post.

    1. Permissions over a post - you have to map the external template PostList.ascx and there you can replace the default web service call with a  custom web service which is populated with the items you want. Please take a look at implementing client side binding.

    2. Permissions over a blog - Replace BlogListView view and there hide the rows from the GridView inside  Grid_RowCreated or Grid_RowDataBound.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Pankaj
    Pankaj avatar
    39 posts
    Registered:
    27 Sep 2010
    08 Dec 2010
    Link to this post
    Its not permission over a post.
    What we want is the permission over a specific blog.
    for ex: we have blog A, B,C
    And Role R1, R2,R3.
    We want only R1 to have view,write etc permission on A not R2,R3.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    08 Dec 2010
    Link to this post
    Hi Pankaj,

    This is explained in point 2!

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. karimulla
    karimulla avatar
    6 posts
    Registered:
    09 Nov 2010
    09 Dec 2010
    Link to this post
    Hi Ivan,

    We also have the same requirement of setting permission per a blog.
    I reviewed the above link (http://www.sitefinity.com/blogs/ivan/posts/09-02-25/replacing_a_child_view_with_another_one.aspx) and0 implemented one sample for news item replacement based on one condition.
    But in case of Blogs, How can we design/create a new BlogList item including Permission over a specific blog with gridview. 
    Can you please elaborate the way of development that how can i achieve.

    Thanks,
    Karimulla.
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Dec 2010
    Link to this post
    Hello karimulla,

    Please take a look at this post - Blog permissions

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Pankaj
    Pankaj avatar
    39 posts
    Registered:
    27 Sep 2010
    09 Dec 2010
    Link to this post
    Thanks Ivan
    The link you gave me is addressing point 1.
    Can you give something for point 2.
    It would be great if you could provide some set of instrucution/code to do this specific requirment.
    As you now know that the requirment is to make permission option available for individual blogs levels.
    We would like to control access on specific blogs.
  8. karimulla
    karimulla avatar
    6 posts
    Registered:
    09 Nov 2010
    09 Dec 2010
    Link to this post
    Hi Ivan,
        I have mapped the BlogsPermissionsView.ascx to my website by following the steps as per the link (http://www.sitefinity.com/devnet/kb/sitefinity-3-x/how-to-map-a-view-to-an-external-template-in-sitefinity-3-6-or-later.aspx). Because my requirement is that i need to set the permission to a particular user over a specific blog.

    I did the following steps to map the page to my Blogs module.

    1. Created a new directory in the App_Data directory and named it as "Configuration"
    2. Created a new file in the Configuration directory and named it "Telerik.Sitefinity.Configuration.ControlsConfig.xml"
    3. I made the config as

    <?xml version="1.0" encoding="utf-8" ?>
    <controlsConfig>
      <viewMap>
        <!-- Insert a new news item template -->
        <viewSettings hostType="Telerik.Blogs.WebControls.Admin.BlogsListView"
        layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/Blogs/BlogsPermissionsView.ascx" />
      </viewMap>
    </controlsConfig>

    4. I placed the BlogsPermissionsView.ascx as per the config path
    5. I placed the template BlogsPermissionsView.ascx.resx file in the specified path.
    6. I restarted the IIS.

    I got the following error for my Blogs page after restarting the IIS.

    "The control must be assignable form type "Telerik.Blogs.WebControls.BlogEditor" and must have ID "blogEditor".]"

    Can you suggest me how can I clear this issue.

    Thanks,
    Karimulla.


  9. Pankaj
    Pankaj avatar
    39 posts
    Registered:
    27 Sep 2010
    09 Dec 2010
    Link to this post
    Waiting for your reply.
  10. karimulla
    karimulla avatar
    6 posts
    Registered:
    09 Nov 2010
    10 Dec 2010
    Link to this post
    Hi,


    It would be great if you could provide some set of instrucution/code to do this specific requirment.

    As you now know that the requirment is to make permission option available for individual blogs levels.
    Or showing blogs as a dropdnow box in the permission page. We would like to control access on specific blogs.
    We have been following on this since last couple of days but didnt get any clear instructions/code.
    At least make it clear if this is possible in 3.7 or not.
    WE have this urgent requirement and last thing to go live. Please help.

    Thanks,
    Karimulla.
  11. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    10 Dec 2010
    Link to this post
    Hello karimulla,


    1. Create a custom data layer where you are going to persist which role /user will see your  blogs. You can use Open Access ORM or LINQ to SQL

    2. Inside permissions view of the blogs provider you should implement anther sections where you get your roles and users for a role. You can use UserManager class and its methods to populate your control with data.

    3. Depending on the value that you will set in point 2 you have to persist the permissions for a given user and role. You should persist the following information in your table

    1- user
    2. blog name

    You have to use Generic Content API and Blogs API. to get the blog names

    4. You have to make queries through your data layer inside BlogsListView and hide the blog as shown in this post which I sent to you several times.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. karimulla
    karimulla avatar
    6 posts
    Registered:
    09 Nov 2010
    10 Dec 2010
    Link to this post
    Thanks Ivan,

    I have a doubt over
    2. Inside permissions view of the blogs provider you should implement anther sections where you get your roles and users for a role. You can use UserManager class and its methods to populate your control with data.

    Please suggest if i am correct:

    #1
    In the permission view we already have the roles drop down box, then why would need another section in it .
    As explained several times before that we are not looking for user level access instead we are looking for role level access control on Blogs.

    Shouldnt we add a drop down listing all blogs using blogmanager GetBlogs() class.

    #2
    On save we should store that config in the newly created table that has fields ( roleid, blogid)

    #3
    On the BlogsListView hide the blog based on the filter we created in data layer (step 1).

    Please suggest if above are correct steps to acheive our requirement.

    Or is there any other better way to do this.
  13. karimulla
    karimulla avatar
    6 posts
    Registered:
    09 Nov 2010
    10 Dec 2010
    Link to this post
    Hi Ivan,

    Can you help me for Blogs Permission View, i.e,
    When we click on Save button in BlogsPermission page which table/stored procedure is getting effected.
    and can you provide me the BlogsPermissionsView page functionality, and it could differently save my time.
    Because in my local sitefinity Admin website, I have the Blogs Permission feature and it works fine.
    But in my Application folder I didn't get the coding for Permissions functionality.

    Thanks,
    Karimulla.
Register for webinar
13 posts, 0 answered