Copied to clipboard

Flag this post as spam?

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


  • Mads Sørensen 188 posts 433 karma points
    Feb 13, 2013 @ 12:53
    Mads Sørensen
    0

    Access nodes outsite content tree

    Hey Guys

    I would like that my client can access nodes outside their sites.
    But umbraco would not allow them to access nodes outsite of their content-tree.

    Is there a plugin or some kind of setting for umbraco to let them access the nodes

  • Anders Stentebjerg 58 posts 234 karma points
    Feb 13, 2013 @ 12:58
    Anders Stentebjerg
    0

    Normally it is not a problem.
    You just need to setup your MNTP the right way.
    Are you using xpath on MNTP now?

  • Mads Sørensen 188 posts 433 karma points
    Feb 13, 2013 @ 13:06
    Mads Sørensen
    0

    no, im not using the xpath.

    But i also think the problem is that the clients not can access nodes outside their content tree?!

    like here where umbraco tells me that: "You do not have permission to view this tree" :P

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 7x admin c-trib
    Feb 13, 2013 @ 13:40
    Chriztian Steinmeier
    0

    Hi Mads,

    Try right-clicking the "Kampagneboxes" node and choose "Permissions", then allow "Browse Node" for the users that needs to do this.

    That might just work ?

    /Chriztian

  • Mads Sørensen 188 posts 433 karma points
    Feb 13, 2013 @ 14:12
    Mads Sørensen
    0

    Hey Chriztian, it's allready set :P

  • Mads Sørensen 188 posts 433 karma points
    Feb 13, 2013 @ 14:40
    Mads Sørensen
    0

    I've tried to use xpath expression but nothing seems to work for me.

    Umbraco will only allow me see the client tree structure :P

  • Comment author was deleted

    Feb 18, 2013 @ 13:36

    His start node is set to the specific structure right? Guess you'll have to do it differently, using user permissions to hide/show certain stuff instead of setting a fixed start node

  • Mads Sørensen 188 posts 433 karma points
    Feb 18, 2013 @ 14:31
    Mads Sørensen
    100

    Hey guys just talked to Tim, the developer of uCom. the MNTP can't reach out of scope by default, sadly but true, but thanks for for your comments :D

    Someone i know will try to make his own kind of MNTP, so that must be the answer for this question :o)

  • Tobias Morf 80 posts 183 karma points
    Feb 18, 2013 @ 16:12
    Tobias Morf
    1

    We already implementd a solution like this. We used the Legacy-Part of uCmponents because we like to have both possibilities (with and without this (security) restrictions). (!) If you use Umbraco 6.0.0 you have to download the latest uComponent version.

    Just change this method: uComponents.Legacy --> DataTypes --> MultiNodeTreePicker --> BaseTreeExtensions.cs

     

            internal static int GetStartNodeId(this BaseTree tree, Content definedStartNode, Content userStartNode)
            {
                if (userStartNode == null)
                {
                    throw new ArgumentNullException("userStartNode");
                }
                //the output start node id
                var determinedStartNodeId = umbraco.uQuery.RootNodeId;
    // *******************************************************************************************
        // Hack to allow users with no access for defined node to access it via multi node tree picker
        // *******************************************************************************************
       
                if (definedStartNode == null)
                {
                    //if the defined (desired) start node is null (could not be found), return NoChildNodesId
                    determinedStartNodeId = NoChildNodesId;
                }
        else
        {
         determinedStartNodeId = definedStartNode.Id;
        }
        /*else if (definedStartNode.Id == umbraco.uQuery.RootNodeId)
        {
         //if the id is -1, then the start node is the user's start node
         determinedStartNodeId = userStartNode.Id;
        }
                else if (definedStartNode.Path.Split(Constants.Common.COMMA).Contains(userStartNode.Id.ToString()))
                {
                    //If User's start node id is found in the defined path, then the start node id
                    //can (allowed) be the defined path.
                    //This should always work for administrator (-1)
                    determinedStartNodeId = definedStartNode.Id;
                }
        else if (userStartNode.Path.Split(Constants.Common.COMMA).Contains(definedStartNode.Id.ToString()))
                {
                    //if the defined start node id is found in the user's path, then the start node id
                    //can only be the user's, not the actual start
                    determinedStartNodeId = userStartNode.Id;
                }
        else if (!definedStartNode.Path.Split(Constants.Common.COMMA).Contains(userStartNode.Id.ToString()))
                {
                    //they should not have any access!
                    determinedStartNodeId = NoAccessId;
                }*/
                return determinedStartNodeId;
            }

     

     

  • Mads Sørensen 188 posts 433 karma points
    Oct 09, 2013 @ 16:28
    Mads Sørensen
    0

    Hej Tobias

    I'm not sure where i'm going to edit your suggestion?

    What file should i write this in?

     

  • Mads Sørensen 188 posts 433 karma points
    Feb 06, 2014 @ 16:10
    Mads Sørensen
    0

    Hi Tobias 

    I've really tried to fix this problem for a long time is possible for you to maybe send me the package?

    I really dont know how to export the Visual studio projekt to get it to a package for umbraco.

    Hope that you can help me :o)

Please Sign in or register to post replies

Write your reply to:

Draft