Copied to clipboard

Flag this post as spam?

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


  • Rich Green 2246 posts 4008 karma points
    Nov 12, 2010 @ 17:59
    Rich Green
    0

    Hiding nodes by user login in back end?

    Is there a way to hide and disable nodes from certain users? 

    For example in the image the user should only be able to edit the nodes highlighted in yellow and the nodes circle red should be hidden or disabled.

    Would appreciate any ideas.

    Rich

     

  • Sean Mooney 131 posts 158 karma points c-trib
    Nov 12, 2010 @ 18:25
    Sean Mooney
    0

    You should be able to do this in the "users" section under "User permissions" then the user you want to change.

    Use the tree to find the page that you want to set permission on then change the check boxes. 

    Uncheck "Browse Node" to hide the node from user.

    Uncheck "Update" to prevent them from editing the page.

     

    Hope that helps

    -Sean

     

  • Rich Green 2246 posts 4008 karma points
    Nov 12, 2010 @ 18:38
    Rich Green
    0

    Hi Sean,

    Appreciate your reply, however I need to do this programmatically.

    What I should have stated in my post is that a user should only be able to edit a node they created.

    As soon as a node is added these rules should automatically apply.

    Rich

     

  • Sean Mooney 131 posts 158 karma points c-trib
    Nov 12, 2010 @ 19:31
    Sean Mooney
    0

    In that case you would probably have to do something using the umbraco.cms.presentation.Trees.BaseTree.BeforeNodeRender event.

    Check out the wiki for more details: 

    http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events/event-examples/remove-context-menu-items

    -Sean

  • Rich Green 2246 posts 4008 karma points
    Nov 12, 2010 @ 20:11
    Rich Green
    0

    Thanks Sean, that might work :)

  • Rich Green 2246 posts 4008 karma points
    Nov 12, 2010 @ 23:10
    Rich Green
    0

    Is there anyway that a umbraco user can be assigned as owning a node?

    The idea being is that certain nodes can only be edited by one user or a separate user group, so in my example the yellow nodes would belong to a user, then when that user logs in I can use the code in your link to disable all other nodes.

    I'm guessing I could use the 'created by' property but there's a chance that an administrator would create the node and then one specific user and the administrator ONLY should be able to edit this node.

    Thanks

    Rich

  • Sean Mooney 131 posts 158 karma points c-trib
    Nov 12, 2010 @ 23:19
    Sean Mooney
    0

    I believe you could simply add a property of number datatype to all pages and manual type in the users id, then check that property on the BeforeNodeRender event

  • Rich Green 2246 posts 4008 karma points
    Nov 12, 2010 @ 23:21
    Rich Green
    0

    Nice idea, many thanks Sean.

    Seems strange that there doesn't seem to be a User picker? Or maybe what I'm trying to do is strange...

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies