Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dan White 206 posts 510 karma points c-trib
    Feb 23, 2013 @ 23:33
    Dan White
    0

    Node Permissions API

    I'm working on writing a class for updating User Permissions. Permission.UpdateCruds requires a CMSNode parameter. I understand that CMSNode is obsolete. 

    Is there a new API for updating user permissions on specific nodes?

  • Charles Afford 1163 posts 1709 karma points
    Feb 24, 2013 @ 13:45
    Charles Afford
    0

    Hello, i am trying to find the same sort of things.  :).   When you say user, do you mean members?  What are you trying to do, i have had some success.  

    Charlie :)

  • Dan White 206 posts 510 karma points c-trib
    Feb 25, 2013 @ 17:42
    Dan White
    0

    @Charlie,

    No, I'm referring to backend users. I have it working, but I just get a notification when using CMSNode that it is obsolute and will be removed from the source eventually. But since umbraco.BusinessLogic.Permission requires a CMSNode object, I'm wondering if there's a newer Permission API I should be using. The current code is actually really simple:

    // get the user object for the user's permissions you'd like to change
    User u = new User("username");
    // pass in the Id of the target node and set the ideal permissions
    Permission.UpdateCruds(u, new CMSNode(targetNodeId), ":CMF");
  • Charles Afford 1163 posts 1709 karma points
    Feb 26, 2013 @ 15:39
    Charles Afford
    0

    Hi, everything has moved to the ASP. membership provider rather than using the umbraco api i believe for this sort of thing.  So you need to the User.Current() out of the HttpContext.Current.

    Additonally umbraco.BusinessLogic.User has helper methods.  Not sure if they are any use for what you are doing though.

    I was looking at the members rather than users.

    Charlie :) 

Please Sign in or register to post replies

Write your reply to:

Draft