new tree provider and context

Mateusz Żebrowski asked on June 26, 2015 13:25

I've got theoretical question. In documentation (working with documnets in API) we can find follwing code:

TreeProvider tree = new TreeProvider(MembershipContext.AuthenticatedUser);

TreeProvider provides functionality to manage tree nodes. So why do we using MembershipContext while creating new TreeProvider object?

Recent Answers


Charles Matvchuk answered on June 26, 2015 15:34

Well, and I have been known to be incorrect, pages are created within the current user context which is picked up from Membership context. Security can be put on tree nodes as well as Parent and Child security.

0 votesVote for this answer Mark as a Correct answer

Joshua Adams answered on June 26, 2015 16:10

Unless it was deprecated(may depend on what version you are using), you can also use TreeProvider tree = new TreeProvider(); without using the current user. I usually use the user signature, just because of what Charles was mentioning above.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.