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

Forums / Developing with Sitefinity / System permissions

System permissions

6 posts, 1 answered
  1. Michael
    Michael avatar
    12 posts
    Registered:
    13 Oct 2008
    16 Feb 2009
    Link to this post
    Hi,

    I'm new to Sitefinity and am working on setting up my first site.
    As I am working on adding our AD-based CMS editor accounts, I've run across a few items I have questions about:

    - Are there template level permissions?
    - Control level permissions?
    - Document gallery level permissions?

    Thanks,
    Michael
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    16 Feb 2009
    Link to this post
    Hi Michael,

    Thank you for using our services.

    Template and control level permissions  have not been implemented yet. For Images and Documents module, permissions are per library.

    Let us know if there is anything else that we can do for you.

    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.
  3. Michael
    Michael avatar
    12 posts
    Registered:
    13 Oct 2008
    16 Feb 2009
    Link to this post
    How do you implement permissions on libraries? 
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    17 Feb 2009
    Link to this post
    Hello Michael,

    The permissions for Images and Documents are based on Generic Content's architecture. Permissions could be get and set using SecurityManager class.

    Let us know if there is anything else that we can do for you.

    Greetings,
    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.
  5. Michael
    Michael avatar
    12 posts
    Registered:
    13 Oct 2008
    23 Feb 2009
    Link to this post
    To clarify the scenario a bit...  we need to have some documents that are only available to a certain group of users.  They will need to be hidden both from the Images & Documents module and from any controls that can access documents stored through this module (Download List, others?).  

    I tried working with the Images & Documents module LibraryListView template with the goal of showing only a certain library based on the user's AD group, but I didn't have much luck.  This would only solve part of the problem anyway, given the need to hide the libraries from controls as well as the module interface.

    Do I have any good options for accomplishing this?
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    25 Feb 2009
    Link to this post
    Hello Michael,

    The solution you require is not so easy to be achieved.

    First - module permissions. They areimplemented for the whole module, not libraries or items. You should edit the LibraryListView  template - which has two modes- Boxes(repeater) and List(grid- AllLibrariesGrid_ItemDataBound method is used)

     protected override void OnPreRender(EventArgs e)  
        {    
           if(Telerik.Security.UserManager.IsCurrentUserInRole("marketing"));  
            {  
               // hide lib... 
            }  
            base.OnPreRender(e);  
        }  


    Second - prevent access to the item/library directly from the browser. This requires creating of a custom ContentHttpHandler that inherits ContentHttpHandler. Then creating a string that represents the current path and using RolePrincipal class to determine whether the user is Authenticated or not, and whether he belongs to a given role.
    Third - implementing permissions for the controls which uses images and documents.

    Best wishes,
    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.
    Answered
Register for webinar
6 posts, 1 answered