2012-01-19 4 views
0

다음 코드 단편은 목록의 보안 상속을 나누어 설명합니다.사이트의 보안 상속 중단 (SharePoint, C#)

 string siteUrl = "http://MyServer/sites/MySiteCollection"; 
     ClientContext oContext = new ClientContext(siteUrl); 
     SP.List oList = oContext.Web.Lists.GetByTitle("Announcements"); 

     oList.BreakRoleInheritance(true, false); 

     oContext.ExecuteQuery(); 

사이트에서 어떻게 동일한 작업을 수행 할 수 있습니까? 참조 : http://msdn.microsoft.com/en-us/library/ee535228.aspx

답변

0

은 기본적으로 다음을 사용할 수 있습니다

SPWeb web = SPContext.Current.Web; 
web.BreakRoleInheritance(true, false); 

참조 : SPWeb.BreakRoleInheritance Method