More in this section

Forums / Developing with Sitefinity / Restricting Access to Custom User Control?

Restricting Access to Custom User Control?

5 posts, 0 answered
  1. Pete
    Pete avatar
    20 posts
    Registered:
    24 Mar 2009
    26 Mar 2009
    Link to this post
    I was sure I'd find a topic on this somewhere, but my search-fu seems to be failing me...

    I am interested in exposing custom user controls only to specific users.  For example, I may have Sharepoint search functionality wrapped up in a user control, but I ONLY want users who are in the "WSSv3 Admins" group to be able to see the control in tool box and/or add it to a page.  I figured there must be something I could define within the toolboxControls entry in web.config, but I couldn't any documentation that could prove or debunk my hunch.

    Is there a baked-in method of security trimming the availability of custom controls and modules from the cms?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    27 Mar 2009
    Link to this post
    Hello Pete,

    I will create a blog post later today. Please check my blog at http://blogs.sitefinity.com/IvanDimitrov/IvanPosts.aspx

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. Pete
    Pete avatar
    20 posts
    Registered:
    24 Mar 2009
    27 Mar 2009
    Link to this post
    Very nice!


    Thank you Ivan, I'll give your solution a whirl a bit later today and let you know how it worked out.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    27 Mar 2009
    Link to this post
    Hi Pete,

    Thanks for getting back to me. The solution should work perfectly.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  5. Pete
    Pete avatar
    20 posts
    Registered:
    24 Mar 2009
    31 Mar 2009
    Link to this post
    This worked quite well, thank you Ivan.

    I took your idea and ran with it a bit by creating a custom section within web.config that acts very much like an <authorization> element, allowing admins to specify a control and list of roles required to use it.  It needs a bit of refining, but you put me on the right track!
Register for webinar
5 posts, 0 answered