How to Setup AssociatedOwnerGroup / AssociatedMemberGroup / AssociatedVisitorGroup
2011-12-07 16:07
471 查看
在SharePoint 2010中,有时候会不小心将默认的3个组(AssociatedOwnerGroup / AssociatedMemberGroup / AssociatedVisitorGroup)给删除掉,如果想重新设置,可以有以下方法设置
1. Coding
using (SPSite spSite = new SPSite("SiteCollectionUrl"))
{
using (SPWeb spWeb = spSite.OpenWeb())
{
spWeb.AssociatedVisitorGroup = spWeb.Groups["VisitorsGroupName"];
spWeb.AssociatedMemberGroup = spWeb.Groups["ContributorGroupName"];
spWeb.AssociatedOwnerGroup = spWeb.Groups["OwnerGroupName"];
spWeb.Update();
}
}
2. 页面
在2010中,隐藏了设置页面,不过可以直接通过URL访问。
[YourSiteURL]/_layouts/permsetup.aspx
1. Coding
using (SPSite spSite = new SPSite("SiteCollectionUrl"))
{
using (SPWeb spWeb = spSite.OpenWeb())
{
spWeb.AssociatedVisitorGroup = spWeb.Groups["VisitorsGroupName"];
spWeb.AssociatedMemberGroup = spWeb.Groups["ContributorGroupName"];
spWeb.AssociatedOwnerGroup = spWeb.Groups["OwnerGroupName"];
spWeb.Update();
}
}
2. 页面
在2010中,隐藏了设置页面,不过可以直接通过URL访问。
[YourSiteURL]/_layouts/permsetup.aspx
相关文章推荐
- Howto Setup yum repositories to update or install package from ISO CDROM Image
- How to solve laptop - network status unknown, dependent service or group cannot start
- Howto Setup yum repositories to update or install package from ISO CDROM Image
- How to get value of the person or group type via CAML Query js
- how to setup ppc2003 or smartphone 2003 to connect to internet
- Howto Setup yum repositories to update or install package from ISO CDROM Image
- Programmatically Adding to and Removing from a Person or Group Column
- How to click a link / button implemented as a div or span element with WebDriver
- HOW TO: Change the Owner of a User-Defined Data Type That Is in Use in SQL Server 2000
- 【翻译自mos文章】How to Set or Switch Oracle Homes on Windows (Doc ID 969581.1)
- HOWTO Setup local Portage and Package Mirror
- How to setup multiple sites hosted on your Mac with OSX 10.8 + (MAMP Part 5)
- How to set mouse speed in X using xset or XF86Config
- How to detect Normal or Large font size settings (DPI)
- how to add a member into the PDS using JCL
- 本周技术关注:ISP-Server Setup - Ubuntu 5.10 'Breezy Badger' | HowtoForge - Linux Howtos and Tutorials
- How to Setup OpenStack to use Local Disks for Instances
- How To Print a Form That Is Too Large for the Screen or Page
- HowtosetupaJavaWorkshop