Hi i want to run a user as administrator to create terms.
SPSite site = SPContext.Current.Site;
SPSecurity.RunWithElevatedPrivileges(() =>
{
using (SPSite secureSite = new SPSite(site.ID))
{
TaxonomySession ts = new TaxonomySession(secureSite);
TermStore termStore = ts.TermStores["Managed Metadata Service"];
Group group = termStore.Groups["MyGroup"];
TermSet termSet = group.CreateTermSet("Termset");
termSet.CreateTerm("Term", 1033);
termStore.CommitAll();
}
I can only create terms if the current user are a Contributor in the termstore, but i want to run this user as administrator without adding the user to the contributor in the term store?