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

Forums / Security / Page Permissions

Page Permissions

3 posts, 0 answered
  1. Doug Dawson
    Doug Dawson avatar
    21 posts
    Registered:
    18 Aug 2009
    22 Nov 2010
    Link to this post
    Hello!

    I don't understand how page permissions work. Here's the method:

    string[] roles = { "RoleName" };
    ISecured sPage = (ISecured)MyPage;

    sPage.SetPermissions(Telerik.Cms.Security.PageRights.View, Telerik.Cms.Security.PageRights.Delete, roles);

    If I want a role to have edit and delete, do I have to call this twice or does delete permission mean you have edit permissions? The API docs don't say anything about what the int value means.

    Thanks!

    Doug

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    30 Sep 2016
    22 Nov 2010
    Link to this post
    Hi Doug,

    This method sets the specified permission for the specified roles. The first parameter is used for setting the allow rights, the second for deny and the third is array of roles. If you want to grant View and Create and deny Delete you can use this code

    sPage.SetPermissions(Telerik.Cms.Security.PageRights.View | Telerik.Cms.Security.PageRights.Create, Telerik.Cms.Security.PageRights.Delete, roles);

    Regards,
    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. Doug Dawson
    Doug Dawson avatar
    21 posts
    Registered:
    18 Aug 2009
    22 Nov 2010
    Link to this post
    Ah! I see now. I didn't see it documented anywhere that this "grant" int was a bitwise result. It might be helpful to indicate that in the documentation. I usually don't work with bitwise stuff, so it didn't occur to me.
Register for webinar
3 posts, 0 answered