Copied to clipboard

Flag this post as spam?

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


  • Carlos 338 posts 472 karma points
    Oct 26, 2010 @ 21:47
    Carlos
    1

    User permissions multiple "Start Node in Content" editing

    Is there a way to set a user as an editor and have them have the ability to edit mutiple nodes or Content sections of our site.

    Right now there is only one "Start Node in Content". Is there a range we can pick or ability to choose multiple start nodes so a person can edit multiple parts of a site that are not subs of the start node they currently are seleted as having the ability to edit?

     

    Thanks

  • Stephen 767 posts 2273 karma points c-trib
    Apr 12, 2011 @ 09:40
    Stephen
    0

    Noone answered that one? We're having the same need.

    There's only one "start node" per user.

    But something similar car be done rather easily via permissions BUT the user still sees plenty of nodes... in our case we have a big list (says, 100) of subnodes, and each user has rights over, say, 4 to 6 of them. We'd like to hide the nodes that the use should not see (no permission) from the tree so that the user does not have to look for his/her own nodes.

    But... there does not seem to be a way to show the user a partial view of the tree. Maybe with a custom tree?

    Any idea?

  • Stephen 767 posts 2273 karma points c-trib
    Apr 12, 2011 @ 09:45
    Stephen
    2

    Answering to myself: remove the "Browse" permission on a node... and it does not seem to show in the tree anymore.

    See also http://our.umbraco.org/forum/developers/extending-umbraco/19147-Hide-node-in-the-backend

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Apr 12, 2011 @ 15:42
    Jeroen Breuer
    0

    Hello,

    I've got the same situation, but I'm not satisfied with the current options. We are having multiple websites in 1 umbraco environment and each website will get a user with only acces to that website, but there are some nodes outside of the website which we want the user to have access to as well. So I would actually like to have 2 start nodes. 1 for the website and 1 for the other nodes (which I want to select the top node of). Is this possible by somehow overriding the content tree node? Maybe use the same technique used in the favorite content package?

    Jeroen

  • Carlos 338 posts 472 karma points
    Apr 12, 2011 @ 18:21
    Carlos
    3

    The 2 Start nodes thing does not work. You actually accomplish all this through the User Permissions.  First you set the start node for the user as the root. You then go to User Permissions, select the users, and select/check off what nodes you DON'T want them to see, edit or use.  Then you deselect browse node and all the other options for editing,etc.
    And then save that. "Browse node" actually is what makes the user have the ability to browse the node and see everything under that node in the tree. 
    Deselecting "Browse node" and saving it more or less shuts off the ability for that user to see what is in that particular node tree and leaves the other ones you want them to edit and see available.  Same concept for all the other options that go along with Browse node.

    Hope that helps.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Apr 12, 2011 @ 18:42
    Jeroen Breuer
    0

    Hi Carlos,

    I've been able to add nodes to the tree by creating my own custom content tree, but if I try to open the nodes in the tree I get this message: "The current user doesn't have permissions to browse this document. Please contact the system administrator.". So I guess it still doesn't work :(. I'll try your description, but I would like to tell which nodes the user must see instead which you can't because this would mean everytime I add a new website I need to modify the rights for all users...

    If somehow I can give the user rights to the nodes I added to the custom tree that would be like the perfect solution :).

    Jeroen

  • Carlos 338 posts 472 karma points
    Apr 12, 2011 @ 19:01
    Carlos
    1

    Yeh, that is an issue with this user permissions thing. If you add new nodes then you have to add or subtract the user permissions.  Unless that person has access to the section of the tree that they already have access to.

    Also, make sure that the user has browsing rights to the Root of the tree you want them to have rights to. Then go in and make the rights permissions changes.

    1. Set the user's root node to the root of the tree you want them to have access to. If this is your custom one then that should be it.

    2. Go to the User Permissions pane and make sure that the user has access to the root node for that tree. Browse, edit, etc.Save that.

    3. Select the sections you Don't want them to have access to. Deselect the "Browse Node" for the sections of the tree you don't want them to have access.

    4. Save that.

    If you want the user to have rights to Edit any of these sections,  you need to make sure that you select those areas and give them rights to Browse, edit etc.

    Pretty much what you are doing with the instructions above are taking away the browsing rights and then adding the browsing rights and editing rights to the ones you want them to.  It can get confusing if you want them to have access to multiple areas of a site within different areas of the tree. 

    **You really don't have to reset permissions for the whole site if you add another section. Technically, the CMS remembers the last permissions for that user. When you go back to the User Permissions pane for that person, it is confusing, because the sections are not "visually" selected like you did before, BUT they are actually already set from the last time. If you add a new section and the user needs access to it, just set the permissions for that section only, then the person will have access that new section and the ones you set up before.

    So far we have not found a fool proof way to set up user permissions easily. 

    I don't know if you have a screen shot(s) of your tree and what sections you want a user to have access to. 

    I can try to edit the comps, make a few more and try to walk through it. Our site is pretty deep too, so our user permission process is a chore if a new user gets added or if a person needs access to a new section.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Apr 14, 2011 @ 10:15
    Jeroen Breuer
    0

    Hi Carlos,

    Here is a screenshot of my tree:

    I want the user to have acces to project 1 and to the custom node. These are already top level nodes. I'm don't have much experience with the user section yet. So you're saying that I can set the rights in a way that if I add project 3 the user won't have acces to it by default even though it's under his selected start node?

    Jeroen

  • Rich Green 2246 posts 4008 karma points
    Apr 14, 2011 @ 10:30
    Rich Green
    0

    We've recently used the API to hide nodes based on the logged in user group, would that solve this issue? Let me know and I'll dig out some code.

    Rich

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Apr 14, 2011 @ 10:45
    Jeroen Breuer
    0

    Currently all the users are in the same group, but I could give each user his own group. I would like to have a code sample if you have one :).

    Jeroen

  • Rich Green 2246 posts 4008 karma points
    Apr 14, 2011 @ 10:54
    Rich Green
    1

    Hey Jeroen,

    Here you go, you should only need to add the users to one user type for this purpose (they can belong to many, so just need to create one called "hidesites" or something)

    using System;
    using umbraco.BusinessLogic;
    using umbraco.presentation.nodeFactory;
    
    namespace iPro.BusinessLogic.Events
    {
        public class TreeEventsExample : ApplicationBase
        {
            public TreeEventsExample()
            {
                umbraco.cms.presentation.Trees.BaseTree.AfterNodeRender += new umbraco.cms.presentation.Trees.BaseTree.AfterNodeRenderEventHandler(BaseTree_AfterNodeRender);
            }
    
            void BaseTree_AfterNodeRender(ref umbraco.cms.presentation.Trees.XmlTree sender, ref umbraco.cms.presentation.Trees.XmlTreeNode node, EventArgs e)
            {
    
                //See if we have to hide any nodes from this user type
                if (umbraco.helper.GetCurrentUmbracoUser().UserType.Alias == "hidesites")
                {
                    //Get current node
                    Node treeNode = new Node(Convert.ToInt32(node.NodeID));
    
                    //List of nodes id we need to hide from user type, would be nicer to put these in config file
                    if (treeNode.Id == 2000 || treeNode.Id == 2001 || treeNode.Id == 2002) //etc
                    {
                          //Hide node  
                          sender.Remove(node);
                    }
    
                }
            }
        }
    }
    
    Rich
  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Apr 14, 2011 @ 11:01
    Jeroen Breuer
    0

    Thanks for the example! That's a nice alternative for multiple start nodes :).

    Jeroen

  • Jason Provence 12 posts 32 karma points
    Sep 11, 2012 @ 20:57
    Jason Provence
    0

    I know this is a really old thread, but I've found that if you need to give people access to only a few sections of a large site, it is easier to make a user type that has basically zero permissions and assign the user to that type.

    From there you can set permissions for the nodes you want (assuming the parent node at least has "browse node" permissions.

    It is identical to what is discussed here, just in reverse.

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Sep 12, 2012 @ 00:26
    Tom Fulton
    0

    Also, just an update since this thread was created, the Epiphany Custom Content Tree package was released, which should have support for multiple start nodes for users.

  • Sam 79 posts 426 karma points
    Sep 26, 2019 @ 14:11
    Sam
    0

    I found that if you edit the user and delete the start node, and save the user without selecting one, the start node will default to Content. allowing the user to see all the start nodes. Hope this helps.

Please Sign in or register to post replies

Write your reply to:

Draft