In this article you will see how to remove a site collection from having read only access to the local site collection taxonomy group in SharePoint 2013 using the server object model.
In this article you will see how to remove a site collection from having read only access to the local site collection taxonomy group in SharePoint 2013 using the server object model.IntroductionI have a site collection http://c4968397007/ in which I have created a taxonomy group. Navigate to the site collection http://c4968397007/. Click on "Settings" then click on "Site Settings".Click on "Term store management" under the Site Administration section. You will be able to see the local site collection taxonomy group in the Taxonomy Term Store.In SharePoint 2013, local term sets can be exposed to other site collections. This is one of the improvements in SharePoint 2013. Please refer to http://www.c-sharpcorner.com/UploadFile/anavijai/cross-site-collection-term-set-access-in-sharepoint-2013/ to learn more about cross site collection term set access in SharePoint 2013. In my last article I explaind how to add the site collections to have read only access to the local site collection taxonomy group in SharePoint 2013 using the server object model. (In this article I have added two site collections to have read only access to the local site collection taxonomy group.). In this article you will see how to remove a site collection from having read only access to the local site collection taxonomy group in SharePoint 2013 using the server object model.Procedure
namespace TaxonomyCodeSamples{ class Program { staticvoid Main(string[] args) { //// removeSiteURL is string variable to store the root URL of site collection string removeSiteURL = "http://c4968397007:8080/sites/AppCatalog";
using (SPSite site = new SPSite("http://c4968397007/")) { TaxonomySession taxSession = new TaxonomySession(site); //// Get the term store TermStore termStore = taxSession.TermStores["MMS"]; //// Get the local site collection taxonomy group Group group = termStore.GetSiteCollectionGroup(site); //// Removes a site collection from having read-only access to this local site collection group. group.DeleteSiteCollectionReadOnlyAccess(removeSiteURL); //// Commit all the changes termStore.CommitAll(); } } }}
SummaryThus in this article you have seen how to remove a site collection from having read only access to the local site collection taxonomy group in SharePoint 2013 using the server object model.Referencehttp://msdn.microsoft.com/en-us/library/microsoft.sharepoint.taxonomy.group.deletesitecollectionreadonlyaccess.aspx
SharePoint 2016 Document Libraries - End User Training Manual