More in this section

Forums / Developing with Sitefinity / sitefinity 5 How check module access type

sitefinity 5 How check module access type

2 posts, 0 answered
  1. doug
    doug avatar
    9 posts
    24 Jan 2011
    30 May 2013
    Link to this post
    How in code do I check what type of module access a given role or current user has? 
    example: I added role view_role1 to have view access to the module and edit_role1 for edit access.

    In my custom module I want to show textboxes and update button for Edits and labels without button for View access.

  2. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    31 May 2017
    04 Jun 2013
    Link to this post

    To get the permission, you use the GetPermission method of the manager. For example (we use blogs module in the sample):
    public void GetPermissionForUser(string userName)
        UserManager usersManager = UserManager.GetManager();
        BlogsManager blogsManager = BlogsManager.GetManager();
        Telerik.Sitefinity.Security.Model.Permission permission = blogsManager.GetPermission(

    I would suggest you to review the following section from our Sitefinity documentation:

    Stefani Tacheva
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered