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.
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
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
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
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
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
Thanks Sean, that might work :)
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
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
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...
is working on a reply...
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.