More in this section
Forums / General Discussions / Modify Page Properties using Fluent API

Modify Page Properties using Fluent API

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Vanitha
    Vanitha avatar
    7 posts
    06 Oct 2010
    25 Oct 2010
    Link to this post
    Hi I checked the article from this link

    Is there any way to change the page view permission for specific user through code?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    25 Oct 2010
    Link to this post
    Hi Vanitha,

    Below is a sample code that illustrates how to set permissions for a given page.

    var pageManager = PageManager.GetManager();
    var page = pageManager.GetPageNodes().Where(p => p.Title == "PermissionsTest").SingleOrDefault();
    Permission perm = pageManager.CreatePermission(SecurityConstants.Sets.Pages.SetName, page.Id, SecurityManager.GetCurrentUserId());
    perm.GrantActions(false, SecurityConstants.Sets.Pages.ChangePermissions);

    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
2 posts, 0 answered