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

Forums / Developing with Sitefinity / Group Page Permissions

Group Page Permissions

2 posts, 0 answered
  1. Jeremy
    Jeremy avatar
    10 posts
    Registered:
    13 May 2015
    05 Aug 2015
    Link to this post

    Hi all,

    I'm trying to build a little project with Sitefinity, using page permissions. I'm trying to group pages together so they all have the same permissions. You know how you go to actions on a page, then click permissions, then after you hit break inheritance you can change which roles can edit the content, or add widgets, or view the pages? I basically want to do this programmatically, dynamically, and in groups. I want one group to have admin users with all access, test users with read/write access, and regular users with read only access, on page group 1. On page group 2, it will change for each role.

    Can I do this with a module? I'm confused as to how I should structure the module, because I don't know how to store arrays in a module (using the module builder, it doesn't look like I can add an array of something).

    Also, if I make a module with the module builder, I don't know how to access the code. It doesn't generate any code in my solution file in Visual Studio. Where can I add methods?

    Finally, I need to be able to access the page permissions programmatically. How is this done? I found this page: http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity/set-page-permissions-programmatically. But, if I type CmsManager manager = new CmsManager(); I get an error because it's not defined. Am I missing a reference? Is this the way I should be doing it? This post is from 2010, so it might be an outdated piece of code.

    If anyone has any answers to my questions I would really appreciate it. I've been working on this for about a week now, and I've read a bunch of documentation and forum posts, but I'm still struggling with some seemingly basic things.

    Direly,
    Jeremy

  2. Velizar Bishurov
    Velizar Bishurov avatar
    143 posts
    Registered:
    01 Dec 2016
    10 Aug 2015
    Link to this post
    Hi Jeremy,

    The information in the forum post you have found is outdated. You can check our documentation articles about the Permissions API and CRUD operations with permissions for the current way to work with permissions programmatically.

    Regards,
    Velizar Bishurov
    Telerik
     
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
2 posts, 0 answered