sharepoint 根据ID读取列表项中的权限

时间:2022-08-21 15:21:22
oWeb = new SPSite("http://dev03/SitePages/Home.aspx").OpenWeb();
   SPListItem item = oWeb.Lists["ListGZ"].GetItemById(itemID);
   int itemRoleNum = item.RoleAssignments.Count;
   for (int i = 0; i < itemRoleNum;i++ )
   {
       List.Add(item.RoleAssignments[i].Member.ToString());
   }