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

Forums / Developing with Sitefinity / Securing a Intra-site module

Securing a Intra-site module

3 posts, 0 answered
  1. Zubair
    Zubair avatar
    142 posts
    Registered:
    26 Dec 2007
    10 Aug 2010
    Link to this post
    Hi,

    We have developed a few intra-site modules and now its time to secure them.

    Here's what we want.

    All modules should appear under Administration > Permissions where we assign roles and give them Allow | Deny access to any module we want in the list.

    Any module should be able check if the logged in user has view rights and hide itself from the navigation if not, note that we dont want fine grained permission on each action within a module (CRUD) so a main security check is enough.

    Please let us know how exactly can we do this.Thanks,
    -Zubair
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    13 Aug 2010
    Link to this post
    Hello Zubair,

    The Administration > Permissions section does not contain form that will allow you to set permissions over all modules. Currently the permissions are set through each module, since Administration > Permissions is used for setting global permissions.
    You have to create a custom form where you set permissions for a given role and module.

    sample

    ISecuredModule module = ModuleManager.WebModules[moduleName] as ISecuredModule;
          if (module != null)
          {   
              // here we set the permissions to our role called CustomUsers
              ISecured permissions = module.SecurityRoot;
              permissions.SetPermissions(CrudRights.View, CrudRights.Delete, "CustomUsers");

    Here is our Permissions TOC that explains step by step and in details how to create custom permissions for not GenericConent based module

    Programming security



    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
  3. Jerami Tainter
    Jerami Tainter avatar
    27 posts
    Registered:
    29 Oct 2009
    13 Aug 2010
    Link to this post
    The using permissions link is a dead link? Can you post the correct link please?

    Thanks

Register for webinar
3 posts, 0 answered