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.