Copied to clipboard

Flag this post as spam?

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


  • Bex 444 posts 555 karma points
    Feb 24, 2016 @ 12:39
    Bex
    0

    Adding User Permissions to Newly Created Nodes (umbraco 4.9)

    Hi

    I am running umbraco 4.9. Its quite customized when it comes to user permissions.

    I have used the following to set browse, update and create permissions on a node:

        Permission.UpdateCruds(u, new CMSNode(Node.Id), "FAC");
    

    for a specific user, but when this user clicks to create a child node on this node the don't have permission to see it so they click create and nothing shows for them.

    I have tried in the Document_AfterSave event (using the ApplicationBase) to add the permissions there, but when I do this:

         Node newNode = new Node(sender.Id);
    

    and then try running

      Permission.UpdateCruds(u, new CMSNode(newNode .Id), "FAC");
    

    It tells me it cant find a node with the ID 0?!!

    Can anyone help?

    Thanjks

    Becky

Please Sign in or register to post replies

Write your reply to:

Draft