SharePoint中,需要对某个没有权限的列表库进行访问和操作时,可以对当前用户的权限进行提升

SPSecurity.RunWithElevatedPrivileges(delegate()

            {
                using (SPSite site = new SPSite(“URL”))
                {
                    using (SPWeb ssweb = site.RootWeb)
                    {
                        SPList list = ssweb.Lists["ListName"];
                        ...//其他操作
                    }
                }
            });

相关文章:

  • 2021-09-23
  • 2021-05-30
  • 2021-12-24
  • 2021-06-23
  • 2021-09-12
  • 2022-01-23
  • 2022-01-19
  • 2021-12-15
猜你喜欢
  • 2021-10-31
  • 2022-02-12
  • 2022-01-08
  • 2021-07-16
  • 2021-10-01
  • 2022-01-14
相关资源
相似解决方案