0

I have built a global navigation solution that replace the SuiteBarLinks and use a term store to store the links for the navigation.

In my testing environment, Farm Account is granted to Term Store Administrators. By logged in as Farm Account, I created a TermGroup "Global Navigation", and under there i have some term sets and terms.

My VS solution have following code:

SPSecurity.RunWithElevatedPrivileges(delegate()
{
   using (SPSite thisSite = new SPSite(SPContext.Current.Site.WebApplication.AlternateUrls[0].Uri.AbsoluteUri))
   {
      TaxonomySession session = new TaxonomySession(thisSite);
      TermStoreCollection store = session.TermStores;
      //load the terms and build the menu html
      try
      {
         //...
      }
   }
}

The code build and run fine. If I open the site as Farm Account , the navigation show up perfectly.

But if I login as normal user, the navigation does not show up.

If I login as Site admin and go Site Setting -> Term Store Management I can see the Global Navigation Group but I cannot expand it, thus I cannot see the terms inside. So perhaps it is something related to the permission.

So how can I grant user read access to the term? And I guess the SPSecurity.RunWithElevatedPrivileges should tickle this but it is not.

1 Answer 1

1

Ok..I solved my problem... But some reason, I must have to check the "Available for Tagging" checkbox for the term set.

I presume this option is used for controlling if allow user to use such term in tagging item. My thought is if I access the terms in code I don't have to have it checked, but I am wrong...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.